{"action":"closed","issue":{"url":"https://api.github.com/repos/greenlion/PHP-SQL-Parser/issues/166","labels_url":"https://api.github.com/repos/greenlion/PHP-SQL-Parser/issues/166/labels{/name}","comments_url":"https://api.github.com/repos/greenlion/PHP-SQL-Parser/issues/166/comments","events_url":"https://api.github.com/repos/greenlion/PHP-SQL-Parser/issues/166/events","html_url":"https://github.com/greenlion/PHP-SQL-Parser/issues/166","id":89110420,"number":166,"title":"USE Key word doesn't work with JOINs","user":{"login":"witchi","id":5766508,"avatar_url":"https://avatars.githubusercontent.com/u/5766508?v=3","gravatar_id":"","url":"https://api.github.com/users/witchi","html_url":"https://github.com/witchi","followers_url":"https://api.github.com/users/witchi/followers","following_url":"https://api.github.com/users/witchi/following{/other_user}","gists_url":"https://api.github.com/users/witchi/gists{/gist_id}","starred_url":"https://api.github.com/users/witchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/witchi/subscriptions","organizations_url":"https://api.github.com/users/witchi/orgs","repos_url":"https://api.github.com/users/witchi/repos","events_url":"https://api.github.com/users/witchi/events{/privacy}","received_events_url":"https://api.github.com/users/witchi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/greenlion/PHP-SQL-Parser/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/greenlion/PHP-SQL-Parser/labels/duplicate","name":"duplicate","color":"cccccc"},{"url":"https://api.github.com/repos/greenlion/PHP-SQL-Parser/labels/imported","name":"imported","color":"FFFFFF"},{"url":"https://api.github.com/repos/greenlion/PHP-SQL-Parser/labels/Priority-Medium","name":"Priority-Medium","color":"FFFFFF"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-17T20:00:52Z","updated_at":"2015-06-17T20:00:59Z","closed_at":"2015-06-17T20:00:59Z","body":"_From [h.leith...@gmail.com](https://code.google.com/u/115105406225264640830/) on May 09, 2014 17:20:05_\n\nWhat steps will reproduce the problem? SELECT * FROM tbl_name AS tbl_alias USE KEY (tbl_column) JOIN tbl_join AS join_alias ON tbl_alias.catid = join_alias.id\r\n\r\nThis query returns:\r\nArray\r\n(\r\n    [SELECT] => Array\r\n        (\r\n            [0] => Array\r\n                (\r\n                    [expr_type] => colref\r\n                    [alias] =>\r\n                    [base_expr] => *\r\n                    [sub_tree] =>\r\n                    [delim] =>\r\n                )\r\n\r\n        )\r\n\r\n    [FROM] => Array\r\n        (\r\n            [0] => Array\r\n                (\r\n                    [expr_type] => table\r\n                    [table] => tbl_name\r\n                    [no_quotes] => tbl_name\r\n                    [alias] => Array\r\n                        (\r\n                            [as] => 1\r\n                            [name] => tbl_alias\r\n                            [base_expr] => AS tbl_alias\r\n                            [no_quotes] => tbl_alias\r\n                        )\r\n\r\n                    [join_type] => JOIN\r\n                    [ref_type] =>\r\n                    [ref_clause] =>\r\n                    [base_expr] => tbl_name AS tbl_alias\r\n                    [sub_tree] =>\r\n                )\r\n\r\n        )\r\n\r\n    [USE] => Array\r\n        (\r\n            [0] => USE\r\n            [1] => KEY\r\n            [2] =>\r\n            [3] => (tbl_column)\r\n            [4] =>\r\n            [5] => JOIN\r\n            [6] =>\r\n            [7] => tbl_join\r\n            [8] =>\r\n            [9] => AS\r\n            [10] =>\r\n            [11] => join_alias\r\n            [12] =>\r\n            [13] => ON\r\n            [14] =>\r\n            [15] => tbl_alias.catid\r\n            [16] =>\r\n            [17] => =\r\n            [18] =>\r\n            [19] => join_alias.id\r\n        )\r\n\r\n) What is the expected output? What do you see instead? The correct JOIN separation What version of the product are you using? On what operating system? c162c6458e (lastest today)\n\n_Original issue: http://code.google.com/p/php-sql-parser/issues/detail?id=140_"}}