Problem with my filtering search...

Talk about Filter (search) Settings

Moderator: alexandrleonenko

MGGRodriguez
Senior
Senior
Posts: 35
Joined: Sep 21st, '09, 16:45

Problem with my filtering search...

Postby MGGRodriguez » Jan 24th, '14, 11:20

Hello,

I have a problem regarding filters.

When I put a condition on $ sql search filters fail, that is, as if there were, since each search does not result in anything in datagrid ...

How can I resolve this situation?

thank you

administrator
Site Admin
Site Admin
Posts: 5997
Joined: Jan 7th, '09, 23:18
Contact:

Re: Problem with my filtering search...

Postby administrator » Jan 26th, '14, 08:00

Please turn on debug mode and check what you see.
Does it help to understand what the problem is?

ukrao_70
Junior
Junior
Posts: 12
Joined: Feb 22nd, '16, 08:39

Re: Problem with my filtering search...

Postby ukrao_70 » Mar 1st, '16, 04:53

my date field filter is not working..

$filtering_fields = array(
"SU ID" =>array("table"=>"activity_details1", "field"=>"su_id", "source"=>$fill_from_array3, "order"=>"ASC", "operator"=>true, "type"=>"dropdownlist", "case_sensitive"=>false, "comparison_type"=>"binary"),
"Activity Name" =>array("table"=>"activity_details1", "field"=>"activity_name", "source"=>$fill_from_array1, "order"=>"ASC", "operator"=>true, "type"=>"dropdownlist", "case_sensitive"=>false, "comparison_type"=>"binary"),
"Date From"=>array("type"=>"calendar", "table"=>"activity_details1", "field"=>"date_from", "show_operator"=>"false", "default_operator"=>"=|<|>|like|%like|like%|%like%|not like", "case_sensitive"=>"false", "comparison_type"=>"binary", "width"=>"", "on_js_event"=>""),
"Date To"=>array("type"=>"calendar", "table"=>"activity_details1", "field"=>"date_to", "show_operator"=>"false", "default_operator"=>"=|<|>|like|%like|like%|%like%|not like", "case_sensitive"=>"false", "comparison_type"=>"string|numeric|binary", "width"=>"", "on_js_event"=>""),
);

the error i get :

search sql (total: 0) SELECT activity_details1.sl_no, activity_details1.su_id, activity_details1.activity_name, activity_details1.date_from, activity_details1.date_to, activity_details1.time_from, activity_details1.time_to, activity_details1.vertical_from, activity_details1.vertical_to, activity_details1.lateral_from, activity_details1.lateral_to, CASE WHEN activity_details1.notam_req = 1 THEN 'Yes' ELSE 'No' END as notam_req, activity_details1.recd_on, activity_details1.affected_units, activity_details1.approved_on, activity_details1.notam_no FROM activity_details1 WHERE 1=1 AND ( activity_details1.date_from = '2016-02-29' ) WHERE 1=1 ORDER BY 1 ASC LIMIT 0, 10

Errors:

1) SELECT activity_details1.sl_no, activity_details1.su_id, activity_details1.activity_name, activity_details1.date_from, activity_details1.date_to, activity_details1.time_from, activity_details1.time_to, activity_details1.vertical_from, activity_details1.vertical_to, activity_details1.lateral_from, activity_details1.lateral_to, CASE WHEN activity_details1.notam_req = 1 THEN 'Yes' ELSE 'No' END as notam_req, activity_details1.recd_on, activity_details1.affected_units, activity_details1.approved_on, activity_details1.notam_no FROM activity_details1 WHERE 1=1 AND ( activity_details1.date_from = '2016-02-29' ) WHERE 1=1 ORDER BY 1 ASC LIMIT 0, 10

[nativecode=1064 ** 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 'WHERE 1=1 ORDER BY 1 ASC LIMIT 0, 10' at line 1]

please help ..

administrator
Site Admin
Site Admin
Posts: 5997
Joined: Jan 7th, '09, 23:18
Contact:

Re: Problem with my filtering search...

Postby administrator » Mar 2nd, '16, 06:27

What version you work with? 4.2.8?
Seems this error was fixed in latest versions.


Return to “Settings: Filtering (search) / Autocomplete”