Limit clause fixes
diff --git a/system/database/drivers/interbase/interbase_driver.php b/system/database/drivers/interbase/interbase_driver.php
index 36ef42e..197c014 100644
--- a/system/database/drivers/interbase/interbase_driver.php
+++ b/system/database/drivers/interbase/interbase_driver.php
@@ -436,7 +436,10 @@
*/
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 @@
$valstr[] = $key." = ".$val;
}
- $limit = ( ! $limit) ? '' : ' LIMIT '.$limit;
+ //$limit = ( ! $limit) ? '' : ' LIMIT '.$limit;
$orderby = (count($orderby) >= 1)?' ORDER BY '.implode(", ", $orderby):'';
@@ -572,7 +575,7 @@
$sql .= ($where != '' AND count($where) >=1) ? " WHERE ".implode(" ", $where) : '';
- $sql .= $orderby.$limit;
+ $sql .= $orderby;
return $sql;
}
@@ -627,7 +630,7 @@
//$limit = ( ! $limit) ? '' : ' LIMIT '.$limit;
- return "DELETE FROM ".$table.$conditions.$limit;
+ return "DELETE FROM {$table}{$conditions}";
}
// --------------------------------------------------------------------
@@ -664,6 +667,5 @@
}
}
-
/* End of file interbase_driver.php */
/* Location: ./system/database/drivers/interbase/interbase_driver.php */
\ No newline at end of file
diff --git a/system/database/drivers/interbase/interbase_result.php b/system/database/drivers/interbase/interbase_result.php
index 9d82789..f2465ab 100644
--- a/system/database/drivers/interbase/interbase_result.php
+++ b/system/database/drivers/interbase/interbase_result.php
@@ -149,7 +149,7 @@
*/
public function _data_seek($n = 0)
{
- //Interbase driver doesn't implement a sutable function
+ //Interbase driver doesn't implement a suitable function
return array();
}
@@ -185,6 +185,5 @@
}
-
/* End of file interbase_result.php */
/* Location: ./system/database/drivers/interbase/interbase_result.php */
\ No newline at end of file