From b071bb5a92aade551345a495fb13f5678f3978d0 Mon Sep 17 00:00:00 2001 From: admin Date: Sat, 26 Aug 2006 19:28:37 +0000 Subject: --- system/drivers/DB_postgre.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'system/drivers/DB_postgre.php') 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; -- cgit v1.2.3-24-g4f1b