Filter generates SQL errors

QuestionsFilter generates SQL errors
Jeremy asked 8 years ago

I found a few other questions on here about this, but nothing that solved my problem.

I have a very simple grid with 4 columns, the first being a primary key ID. If I type in the filter box above a column, I get a MySQL error:

"Couldn't execute query. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND ( `type_id` LIKE '%1%' )) pg_tmp' at line 1 – SELECT count(*) as c FROM (SELECT * FROM Organizations AND ( `type_id` LIKE '%1%' )) pg_tmp"

It seems like the "AND" should be a "WHERE"?

I can't figure out why I only have this problem with this very simple grid and not with my other ones. It affects all 4 columns.

Code is here: http://pastebin.com/A68KkJev

Thanks in advance.

1 Answers
Jeremy answered 8 years ago

Ok – nvrmnd. I started debugging thru the actual phpgrid code and then noticed that the demos were also throwing the SQL errors. Apparently my copy of the code got corrupted somehow. I unzipped a fresh copy and the problem disappeared. Sorry about that.

Your Answer

0 + 14 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?