Postgres (and probably others as well) needs an explicit char cast.

This commit is contained in:
Thomas Keller 2011-06-30 00:25:29 +02:00
parent 324b202215
commit 7b2552f940

View File

@ -747,7 +747,7 @@ class IDF_Views_Issue
else {
// ID-based search
if (is_numeric($query)) {
$sql = new Pluf_SQL('project=%s AND id LIKE %s', array($prj->id, $query.'%'));
$sql = new Pluf_SQL('project=%s AND CAST(id AS CHAR) LIKE %s', array($prj->id, $query.'%'));
$tmp = Pluf::factory('IDF_Issue')->getList(array(
'filter' => $sql->gen(),
'order' => 'id ASC'