Page 1 of 1

Date column gives search error in Browse Form

Posted: Tue Mar 06, 2018 3:54 pm
by KEE
Date column gives error for Illegal mix of collations for operation 'like', when typing "non-latin" characters.
The following fixes in the nuform.php file solved for me this problem.
In the function nuBrowseWhereClause:

Code: Select all

            if ($task[$i] == 'include') {
                $include[] = $searchFields[$SF] . ' LIKE  ' . $SEARCHES[$i];
            } else {
                $exclude[] = $searchFields[$SF] . ' NOT LIKE  ' . $SEARCHES[$i];
            }
I have fix:

Code: Select all

            if ($task[$i] == 'include') {
                $include[] = 'CONVERT(' . $searchFields[$SF] . ' USING utf8) LIKE  ' . $SEARCHES[$i];
            } else {
                $exclude[] = 'CONVERT(' . $searchFields[$SF] . ' USING utf8) NOT LIKE  ' . $SEARCHES[$i];
            }


Re: Date column gives search error in Browse Form

Posted: Tue Mar 06, 2018 8:15 pm
by admin
KEE,

Thanks for that, I've put your changes on Github.

Steven