From 2b9c6b8609aecfec5d56b768583056e2afa76459 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Tue, 4 Jan 2011 17:44:33 -0430 Subject: [PATCH] optimizing sqlite driver to look for the "From" keyword in reverse order on the sql string --- cake/libs/model/datasources/dbo/dbo_sqlite.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cake/libs/model/datasources/dbo/dbo_sqlite.php b/cake/libs/model/datasources/dbo/dbo_sqlite.php index 5f34023f3..6819adf9a 100644 --- a/cake/libs/model/datasources/dbo/dbo_sqlite.php +++ b/cake/libs/model/datasources/dbo/dbo_sqlite.php @@ -284,7 +284,7 @@ class DboSqlite extends DboSource { // so try to figure it out based on the querystring $querystring = $results->queryString; if (stripos($querystring, 'SELECT') === 0) { - $last = stripos($querystring, 'FROM'); + $last = strripos($querystring, 'FROM'); if ($last !== false) { $selectpart = substr($querystring, 7, $last - 8); $selects = explode(',', $selectpart);