diff options
author | SammyK <sammyk@sammykmedia.com> | 2012-03-05 23:38:29 +0100 |
---|---|---|
committer | SammyK <sammyk@sammykmedia.com> | 2012-03-05 23:38:29 +0100 |
commit | dc8dc745557c2f256abad50d32f5aae85e996b1e (patch) | |
tree | 17927f58d1747f4a75a7877916b9f00606bb81e4 | |
parent | 567474528e0c1a4e305dbe8787b83e526b46eb02 (diff) |
Fixed bug for PostgreSQL driver where setting a limit() on update() or delete() would throw a syntax error from Postgres.
-rw-r--r-- | system/database/drivers/postgre/postgre_driver.php | 4 |
1 files changed, 2 insertions, 2 deletions
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; } |