From 5e7ac0e9a4319d29fd23b5525aef05ad28ff0706 Mon Sep 17 00:00:00 2001 From: admin Date: Sun, 3 Sep 2006 18:29:51 +0000 Subject: --- system/drivers/DB_postgre.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'system/drivers') diff --git a/system/drivers/DB_postgre.php b/system/drivers/DB_postgre.php index 673dea335..f0be3c0b1 100644 --- a/system/drivers/DB_postgre.php +++ b/system/drivers/DB_postgre.php @@ -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'; @@ -216,7 +216,6 @@ class CI_DB_postgre extends CI_DB { * * This function adds backticks if the table name has a period * in it. Some DBs will get cranky unless periods are escaped. - * NOT NEEDED FOR POSTGRE * * @access public * @param string the table name @@ -224,12 +223,10 @@ class CI_DB_postgre extends CI_DB { */ function escape_table($table) { - /* if (stristr($table, '.')) { - $table = preg_replace("/\./", "`.`", $table); + $table = '"'.preg_replace("/\./", '"."', $table).'"'; } - */ return $table; } -- cgit v1.2.3-24-g4f1b