PHP Classes

Bug report

Recommend this page to a friend!

      SQL Parse Convert to Tree Array  >  All threads  >  Bug report  >  (Un) Subscribe thread alerts  
Subject:Bug report
Summary:Nice but having problems...
Messages:2
Author:Attila Posztos
Date:2009-02-03 15:41:48
Update:2009-06-08 09:10:10
 

  1. Bug report   Reply   Report abuse  
Picture of Attila Posztos Attila Posztos - 2009-02-03 15:41:48
This seems to be a nice and good class, exactly the thing i need now. However i have 2 issues, a lighweight, and a pretty ugly one.
First the leight one: i prefer error_reporting(E_ALL) setting, and that way it spits a lot of undefined variable/index notices ($lr, $_tree['_a'], $_tree['_z'])
And the uglier: add some parenthesis to yout simple query example:
SELECT field1, field2 FROM table WHERE field3='val1' AND (field4=5 OR field5='val2')
and you'll get a bit messed up tree:
[code]
Array
(
[SQL] => Array
(
[_a] => 0
[_z] => 85
[SELECT] => Array
(
[FROM] => Array
(
[TABLE] => table
)
[WHERE] => Array
(
[0|*AND] => Array
(
[0|!EQ] => Array
(
[FIELD] => field3
)
[1|!EQ] => Array
(
[VAL] => 'val1'
)
)
[1|*AND] => Array
(
[0|*OR] => Array
(
[0|!EQ] => Array
(
[FIELD] => field4
)
[1|!EQ] => Array
(
[FIELD] => 5 OR field5
)
[2|!EQ] => Array
(
[VAL] => 'val2'
)
)
)
)
[0|*SELECT] => Array
(
[FIELD] => field1
)
[1|*SELECT] => Array
(
[FIELD] => field2
)
)
)
)
[/code]
See that '[FIELD] => 5 OR field5' line? I think this shouldnt be this way...

Keep up the good work anyway!
Cheers!

  2. Re: Bug report   Reply   Report abuse  
Picture of François NEUMANN-RYSTOW François NEUMANN-RYSTOW - 2009-06-08 09:10:10 - In reply to message 1 from Attila Posztos
you can redownload it,
you will get what you expected.