summaryrefslogtreecommitdiffstats
path: root/system/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'system/drivers')
-rw-r--r--system/drivers/DB_mssql.php2
-rw-r--r--system/drivers/DB_mysql.php2
-rw-r--r--system/drivers/DB_mysqli.php2
-rw-r--r--system/drivers/DB_odbc.php2
-rw-r--r--system/drivers/DB_postgre.php8
-rw-r--r--system/drivers/DB_sqlite.php2
6 files changed, 9 insertions, 9 deletions
diff --git a/system/drivers/DB_mssql.php b/system/drivers/DB_mssql.php
index 6156ec3c9..48d1929e3 100644
--- a/system/drivers/DB_mssql.php
+++ b/system/drivers/DB_mssql.php
@@ -93,7 +93,7 @@ class CI_DB_mssql extends CI_DB {
* @param string an SQL query
* @return string
*/
- function &_prep_query($sql)
+ function _prep_query($sql)
{
return $sql;
}
diff --git a/system/drivers/DB_mysql.php b/system/drivers/DB_mysql.php
index 18c080b21..82e677a1a 100644
--- a/system/drivers/DB_mysql.php
+++ b/system/drivers/DB_mysql.php
@@ -100,7 +100,7 @@ class CI_DB_mysql extends CI_DB {
* @param string an SQL query
* @return string
*/
- function &_prep_query($sql)
+ function _prep_query($sql)
{
// "DELETE FROM TABLE" returns 0 affected rows This hack modifies
// the query so that it returns the number of affected rows
diff --git a/system/drivers/DB_mysqli.php b/system/drivers/DB_mysqli.php
index f8cb19dbe..32c4c0f89 100644
--- a/system/drivers/DB_mysqli.php
+++ b/system/drivers/DB_mysqli.php
@@ -102,7 +102,7 @@ class CI_DB_mysqli extends CI_DB {
* @param string an SQL query
* @return string
*/
- function &_prep_query($sql)
+ function _prep_query($sql)
{
// "DELETE FROM TABLE" returns 0 affected rows This hack modifies
// the query so that it returns the number of affected rows
diff --git a/system/drivers/DB_odbc.php b/system/drivers/DB_odbc.php
index fac44904b..50f39accd 100644
--- a/system/drivers/DB_odbc.php
+++ b/system/drivers/DB_odbc.php
@@ -94,7 +94,7 @@ class CI_DB_odbc extends CI_DB {
* @param string an SQL query
* @return string
*/
- function &_prep_query($sql)
+ function _prep_query($sql)
{
return $sql;
}
diff --git a/system/drivers/DB_postgre.php b/system/drivers/DB_postgre.php
index 01d4b3df0..3829b04af 100644
--- a/system/drivers/DB_postgre.php
+++ b/system/drivers/DB_postgre.php
@@ -94,7 +94,7 @@ class CI_DB_postgre extends CI_DB {
* @param string an SQL query
* @return string
*/
- function &_prep_query($sql)
+ function _prep_query($sql)
{
return $sql;
}
@@ -174,7 +174,7 @@ class CI_DB_postgre extends CI_DB {
if ($table == '')
return '0';
- $query = $this->query("SELECT COUNT(*) AS numrows FROM `".$this->dbprefix.$table."`");
+ $query = $this->query("SELECT COUNT(*) AS numrows FROM ".$this->dbprefix.$table."");
if ($query->num_rows() == 0)
return '0';
@@ -225,7 +225,7 @@ class CI_DB_postgre extends CI_DB {
{
if (stristr($table, '.'))
{
- $table = preg_replace("/\./", "`.`", $table);
+ $table = preg_replace("/\./", ".", $table);
}
return $table;
@@ -432,7 +432,7 @@ class CI_DB_postgre_result extends CI_DB_result {
$F->name = pg_field_name($this->result_id, $i);
$F->type = pg_field_type($this->result_id, $i);
$F->max_length = pg_field_size($this->result_id, $i);
- $F->primary_key = 0;
+ $F->primary_key = $i == 0;
$F->default = '';
$retval[] = $F;
diff --git a/system/drivers/DB_sqlite.php b/system/drivers/DB_sqlite.php
index 6428dd5bb..1192e6dc7 100644
--- a/system/drivers/DB_sqlite.php
+++ b/system/drivers/DB_sqlite.php
@@ -115,7 +115,7 @@ class CI_DB_sqlite extends CI_DB {
* @param string an SQL query
* @return string
*/
- function &_prep_query($sql)
+ function _prep_query($sql)
{
return $sql;
}