From dc8dc745557c2f256abad50d32f5aae85e996b1e Mon Sep 17 00:00:00 2001 From: SammyK Date: Mon, 5 Mar 2012 16:38:29 -0600 Subject: Fixed bug for PostgreSQL driver where setting a limit() on update() or delete() would throw a syntax error from Postgres. --- system/database/drivers/postgre/postgre_driver.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system/database/drivers/postgre') diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php index df0f50da5..3fdcfa79e 100644 --- a/system/database/drivers/postgre/postgre_driver.php +++ b/system/database/drivers/postgre/postgre_driver.php @@ -587,7 +587,7 @@ class CI_DB_postgre_driver extends CI_DB { $valstr[] = $key." = ".$val; } - $limit = ( ! $limit) ? '' : ' LIMIT '.$limit; + $limit = ''; $orderby = (count($orderby) >= 1)?' ORDER BY '.implode(", ", $orderby):''; @@ -647,7 +647,7 @@ class CI_DB_postgre_driver extends CI_DB { $conditions .= implode("\n", $like); } - $limit = ( ! $limit) ? '' : ' LIMIT '.$limit; + $limit = ''; return "DELETE FROM ".$table.$conditions.$limit; } -- cgit v1.2.3-24-g4f1b