PHP Classes

Found a bug

Recommend this page to a friend!

      SQL Parse Convert to Tree Array  >  All threads  >  Found a bug  >  (Un) Subscribe thread alerts  
Subject:Found a bug
Summary:Query in brackets
Date:2009-06-02 12:39:49
Update:2009-06-02 13:34:08

  1. Found a bug   Reply   Report abuse  
thijsdj - 2009-06-02 12:39:49

I like your class! We use it a lot here.

I found a bug, when parsing this query:
"(select count(*) || ' : 02-06-2009, 14:25124394551987' from fooooo)"

Yes, including the brackets at the start and the end. That's the problem.

The TABLE in the parsed response is called "fooooo)".

Here's the complete result:

array(1) {
array(3) {
array(2) {
array(1) {
string(7) "fooooo)"
array(3) {
array(1) {
string(8) "count(*)"
array(1) {
string(2) "||"
array(1) {
string(34) "' : 02-06-2009, 14:25124394551987'"

We wrote a small workaround, but I just wanted to let you know this is a bug.


  2. Re: Found a bug   Reply   Report abuse  
François NEUMANN-RYSTOW - 2009-06-02 13:31:09 - In reply to message 1 from thijsdj
I have to take a serious look at brackets use in SQL.
Personnaly I use postgres and table
that are full uppercase need to be in brackets,
but some databases system can interpret brackets as quote (string value).

What is sure, is that actually, the class doesnt have some code to handle brackets !

  3. Re: Found a bug   Reply   Report abuse  
François NEUMANN-RYSTOW - 2009-06-02 13:34:08 - In reply to message 2 from François NEUMANN-RYSTOW
i have to code operator support to
(operator || is used in your query)