diff options
author | Timothy Warren <tim@timshomepage.net> | 2012-02-15 17:48:57 +0100 |
---|---|---|
committer | Timothy Warren <tim@timshomepage.net> | 2012-02-15 17:48:57 +0100 |
commit | 8be31a92758959d7fd7b035e36b9799da13426ae (patch) | |
tree | 2f5cd272c2999fd5d66a0831f953185515298b11 /system/database/drivers/interbase/interbase_driver.php | |
parent | 3d985a19ac05a8f5141b51fed9b1b37946733792 (diff) |
Limit clause fixes
Diffstat (limited to 'system/database/drivers/interbase/interbase_driver.php')
-rw-r--r-- | system/database/drivers/interbase/interbase_driver.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/system/database/drivers/interbase/interbase_driver.php b/system/database/drivers/interbase/interbase_driver.php index 36ef42ef3..197c01401 100644 --- a/system/database/drivers/interbase/interbase_driver.php +++ b/system/database/drivers/interbase/interbase_driver.php @@ -436,7 +436,10 @@ SQL; */ public function _field_data($table) { - return "SELECT * FROM ".$table." LIMIT 1"; + // Need to find a more efficient way to do this + // but Interbase/Firebird seems to lack the + // limit clause + return "SELECT * FROM {$table}"; } // -------------------------------------------------------------------- @@ -564,7 +567,7 @@ SQL; $valstr[] = $key." = ".$val; } - $limit = ( ! $limit) ? '' : ' LIMIT '.$limit; + //$limit = ( ! $limit) ? '' : ' LIMIT '.$limit; $orderby = (count($orderby) >= 1)?' ORDER BY '.implode(", ", $orderby):''; @@ -572,7 +575,7 @@ SQL; $sql .= ($where != '' AND count($where) >=1) ? " WHERE ".implode(" ", $where) : ''; - $sql .= $orderby.$limit; + $sql .= $orderby; return $sql; } @@ -627,7 +630,7 @@ SQL; //$limit = ( ! $limit) ? '' : ' LIMIT '.$limit; - return "DELETE FROM ".$table.$conditions.$limit; + return "DELETE FROM {$table}{$conditions}"; } // -------------------------------------------------------------------- @@ -664,6 +667,5 @@ SQL; } } - /* End of file interbase_driver.php */ /* Location: ./system/database/drivers/interbase/interbase_driver.php */
\ No newline at end of file |