summaryrefslogtreecommitdiffstats
path: root/system/database
diff options
context:
space:
mode:
authorTimothy Warren <tim@timshomepage.net>2012-02-15 17:48:57 +0100
committerTimothy Warren <tim@timshomepage.net>2012-02-15 17:48:57 +0100
commit8be31a92758959d7fd7b035e36b9799da13426ae (patch)
tree2f5cd272c2999fd5d66a0831f953185515298b11 /system/database
parent3d985a19ac05a8f5141b51fed9b1b37946733792 (diff)
Limit clause fixes
Diffstat (limited to 'system/database')
-rw-r--r--system/database/drivers/interbase/interbase_driver.php12
-rw-r--r--system/database/drivers/interbase/interbase_result.php3
2 files changed, 8 insertions, 7 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
diff --git a/system/database/drivers/interbase/interbase_result.php b/system/database/drivers/interbase/interbase_result.php
index 9d827895d..f2465ab5d 100644
--- a/system/database/drivers/interbase/interbase_result.php
+++ b/system/database/drivers/interbase/interbase_result.php
@@ -149,7 +149,7 @@ class CI_DB_interbase_result extends CI_DB_result {
*/
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 @@ class CI_DB_interbase_result extends CI_DB_result {
}
-
/* End of file interbase_result.php */
/* Location: ./system/database/drivers/interbase/interbase_result.php */ \ No newline at end of file