search-not-refreshing-grid

Questionssearch-not-refreshing-grid
Joel Schell asked 14 mins ago

Hi, I\’m having an issue that just started. I can type in the advanced search bar and the grid will display \’loading\’ but the data in the grid doesn\’t change, like the grid isn\’t being refreshed with the search terms. Any idea why this would be happening? The issue just started recently. Thanks for any help.

4 Answers
Abu Ghufran Staff answered 21 mins ago

Most likely its due to some JS error. Check browser debug console for it and share screenshot / details here.

Please check the recent changes you did in the code.

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Joel Schell answered 4 hours ago

Thanks for your quck response. Sorry for the delay in getting back to you.

The browser debug console does not report any errors upon loading the page or typing in the filter field.

The code in question is here: https://gist.github.com/BlaqFlagg/e6808be046023b2d4d0425c69835e7e5

I appreciate your assistance.

Abu Ghufran Staff answered 5 hours ago

In your code try using ( ) for your condition. Perhaps last OR condition overrides every other where clause.

$g->select_command = "SELECT * FROM AdultInfo WHERE noelyear = $noelyear AND fraud = '' OR 'No'";

Should be:

$g->select_command = "SELECT * FROM AdultInfo WHERE noelyear = $noelyear AND (fraud = '' OR fraud = 'No')";

You can also set $g->debug_sql = true; OR $g->debug_search = true; to see what query is going through the database.

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Joel Schell answered 5 hours ago

Yes! That was it. I did not consider it being an issue with the query syntax.  I very much appreciate your help.

Thanks again!

Your Answer

13 + 7 =

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?