From 7b2552f9409c326afb9b7d4e4c5bfb65ae340d85 Mon Sep 17 00:00:00 2001 From: Thomas Keller Date: Thu, 30 Jun 2011 00:25:29 +0200 Subject: [PATCH] Postgres (and probably others as well) needs an explicit char cast. --- src/IDF/Views/Issue.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/IDF/Views/Issue.php b/src/IDF/Views/Issue.php index fc9d7b4..297e02f 100644 --- a/src/IDF/Views/Issue.php +++ b/src/IDF/Views/Issue.php @@ -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'