By default, Search seems to assume columns are TEXT, by using lower(<fieldname>) in the search query. But I have integer fields, such as Year and various ID columns that I want to be searchable. Instead, we get an error:
Couldn’t execute query. ERROR: function lower(integer) does not exist LINE 1: …ation from xxx WHERE 1=1 AND ( LOWER(“year”)…
Do I need cast everything as text? Or is there a better way?
This is used only with the databases (oracle, db2, postgres) which does not perform case insensitive searches in string.
The cast() solution will also work. You can also fix the search operator to equals in case of numeric (and avoid contains search):
$col["searchoptions"]["sopt"] = array("eq");
Abu Ghufran - Dev Team
Grid 4 PHP Framework
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?