{"action":"created","issue":{"url":"https://api.github.com/repos/greenlion/PHP-SQL-Parser/issues/83","labels_url":"https://api.github.com/repos/greenlion/PHP-SQL-Parser/issues/83/labels{/name}","comments_url":"https://api.github.com/repos/greenlion/PHP-SQL-Parser/issues/83/comments","events_url":"https://api.github.com/repos/greenlion/PHP-SQL-Parser/issues/83/events","html_url":"https://github.com/greenlion/PHP-SQL-Parser/issues/83","id":88967150,"number":83,"title":"Error in creator => Fix included","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/imported","name":"imported","color":"FFFFFF"},{"url":"https://api.github.com/repos/greenlion/PHP-SQL-Parser/labels/Priority-Medium","name":"Priority-Medium","color":"FFFFFF"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-17T09:29:55Z","updated_at":"2015-06-17T09:29:57Z","closed_at":null,"body":"_From [fr...@frankmayer.net](https://code.google.com/u/109176653267500871455/) on May 08, 2012 14:49:59_\n\nWhat steps will reproduce the problem? 1. Parse the following query:\r\n\r\nSELECT a.*, SUM(b.home) AS home,b.language,l.image,l.sef,l.title_native\r\nFROM iuz6l_menu_types AS a\r\nLEFT JOIN iuz6l_menu AS b ON b.menutype = a.menutype AND b.home != 0\r\nLEFT JOIN iuz6l_languages AS l ON l.lang_code = language\r\nWHERE (b.client_id = 0 OR b.client_id IS NULL)\r\nGROUP BY a.id, a.menutype, a.description, a.title, b.menutype,b.language,l.image,l.sef,l.title_native\r\n\r\n\r\n\r\n2. hand it over to the creator and voila it fails (php-sql-parser-20120507)\r\n\r\nThe problem lies in the \"processRefClause\" of the creator. It couldn't handle the \" AND b.home != 0\" after the JOIN.\r\n\r\nFIX:\r\n\r\nAdding:\r\n\r\n$sql .= $this->processConstant($v);\r\n\r\nunder \r\n\r\n$sql .= $this->processOperator($v);  ## Line 408\r\n\r\nfixes the problem :)\n\n_Original issue: http://code.google.com/p/php-sql-parser/issues/detail?id=57_"},"comment":{"url":"https://api.github.com/repos/greenlion/PHP-SQL-Parser/issues/comments/112734780","html_url":"https://github.com/greenlion/PHP-SQL-Parser/issues/83#issuecomment-112734780","issue_url":"https://api.github.com/repos/greenlion/PHP-SQL-Parser/issues/83","id":112734780,"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},"created_at":"2015-06-17T09:29:57Z","updated_at":"2015-06-17T09:29:57Z","body":"_From [pho...@gmx.de](https://code.google.com/u/109317404671582518013/) on May 08, 2012 07:34:45_\n\nThank you for the fix, I have added it to REV 273. I like small functions where you can add a simple line and all is fine :-)\n\n**Status:** Fixed  \n  **Owner:** pho...@gmx.de  \n"}}