diff options
author | Piotr Przybylski <piotrprz@gmail.com> | 2011-06-28 19:47:47 +0400 |
---|---|---|
committer | Piotr Przybylski <piotrprz@gmail.com> | 2011-06-28 19:47:47 +0400 |
commit | 713bf220791e9fec6526f821c4f25a2f97fd600a (patch) | |
tree | 6e5194f98cb795e9413e8d8d937ff849b43f1f81 /db_search.php | |
parent | 83117b18d715ae51e47bc988e5d2c40c88ee1dc8 (diff) |
Drizzle has no CONVERT and everything is utf-8
Diffstat (limited to 'db_search.php')
-rw-r--r-- | db_search.php | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/db_search.php b/db_search.php index 5907cc50e7..3f3c7cc5e7 100644 --- a/db_search.php +++ b/db_search.php @@ -154,11 +154,20 @@ if (isset($_REQUEST['submit_search'])) { $thefieldlikevalue = array(); foreach ($tblfields as $tblfield) { if (! isset($field) || strlen($field) == 0 || $tblfield['Field'] == $field) { - $thefieldlikevalue[] = 'CONVERT(' . PMA_backquote($tblfield['Field']) . ' USING utf8)' - . ' ' . $like_or_regex . ' ' - . "'" . $automatic_wildcard - . $search_word - . $automatic_wildcard . "'"; + // Drizzle has no CONVERT and all text columns are UTF-8 + if (PMA_DRIZZLE) { + $thefieldlikevalue[] = PMA_backquote($tblfield['Field']) + . ' ' . $like_or_regex . ' ' + . "'" . $automatic_wildcard + . $search_word + . $automatic_wildcard . "'"; + } else { + $thefieldlikevalue[] = 'CONVERT(' . PMA_backquote($tblfield['Field']) . ' USING utf8)' + . ' ' . $like_or_regex . ' ' + . "'" . $automatic_wildcard + . $search_word + . $automatic_wildcard . "'"; + } } } // end for |