rickywu-posh / php-sql-parser

Automatically exported from code.google.com/p/php-sql-parser
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

cannot calculate position for the query inside #44

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
Try to parse this query with position option set to true
SELECT m.id, m.title, m.module, m.position, m.content, m.showtitle, m.params, 
mm.menuid
FROM kj9un_modules AS m
LEFT JOIN kj9un_modules_menu AS mm ON mm.moduleid = m.id
LEFT JOIN kj9un_extensions AS e ON e.element = m.module AND e.client_id = 
m.client_id
WHERE m.published = 1 AND e.enabled = 1 AND (m.publish_up = '0000-00-00 
00:00:00' OR m.publish_up <= '2012-04-21 09:44:01') AND (m.publish_down = 
'0000-00-00 00:00:00' OR m.publish_down >= '2012-04-21 09:44:01') AND m.access 
IN (1,1) AND m.client_id = 0 AND (mm.menuid = 170 OR mm.menuid <= 0) AND 
m.language IN ('en-GB','*')
ORDER BY m.position, m.ordering
 cannot calculate position of 1 within AND m.client_id = 0 AND (mm.menuid = 170 OR mm.menuid <= 0) AND m.language IN ('en-GB','*') ORDER BY m.position, m.ordering

Ends in: cannot calculate position of 1 within AND m.client_id = 0 AND 
(mm.menuid = 170 OR mm.menuid <= 0) AND m.language IN ('en-GB','*') ORDER BY 
m.position, m.ordering

What version of the product are you using? On what operating system?
Todays version

Original issue reported on code.google.com by h.leith...@gmail.com on 21 Apr 2012 at 9:54

GoogleCodeExporter commented 8 years ago
Please check out the REV 241, I have added a test case.

Original comment by pho...@gmx.de on 26 Apr 2012 at 12:19

GoogleCodeExporter commented 8 years ago

Original comment by pho...@gmx.de on 30 Apr 2012 at 11:25

GoogleCodeExporter commented 8 years ago
Works fine now thx

Original comment by h.leith...@gmail.com on 3 May 2012 at 4:07