summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authoradmin <devnull@localhost>2006-10-23 23:18:36 +0200
committeradmin <devnull@localhost>2006-10-23 23:18:36 +0200
commitca335fcd8342ec1422a63ac397a404e73766b0ef (patch)
treef0ce8dfb93f1bdcb6868bc7fdf633575c7a26af7 /system
parentc1e23ce329575d2777dc1c87b87c4b1171c4e18b (diff)
Diffstat (limited to 'system')
-rw-r--r--system/database/drivers/mssql/mssql_driver.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/system/database/drivers/mssql/mssql_driver.php b/system/database/drivers/mssql/mssql_driver.php
index a1d7d29ed..f8eea5b45 100644
--- a/system/database/drivers/mssql/mssql_driver.php
+++ b/system/database/drivers/mssql/mssql_driver.php
@@ -38,7 +38,7 @@ class CI_DB_mssql_driver extends CI_DB {
*/
function db_connect()
{
- return mssql_connect($this->hostname, $this->username, $this->password);
+ return @mssql_connect($this->hostname, $this->username, $this->password);
}
// --------------------------------------------------------------------
@@ -51,7 +51,7 @@ class CI_DB_mssql_driver extends CI_DB {
*/
function db_pconnect()
{
- return mssql_pconnect($this->hostname, $this->username, $this->password);
+ return @mssql_pconnect($this->hostname, $this->username, $this->password);
}
// --------------------------------------------------------------------
@@ -250,7 +250,7 @@ class CI_DB_mssql_driver 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';
@@ -303,7 +303,7 @@ class CI_DB_mssql_driver extends CI_DB {
*/
function _field_data($table)
{
- return "SELECT TOP 1 FROM ".$this->_escape_table($table);
+ return "SELECT TOP 1 * FROM ".$this->_escape_table($table);
}
// --------------------------------------------------------------------
@@ -348,10 +348,14 @@ class CI_DB_mssql_driver extends CI_DB {
*/
function _escape_table($table)
{
+ // I don't believe this is necessary with MS SQL. Not sure, though. - Rick
+
+ /*
if (stristr($table, '.'))
{
$table = preg_replace("/\./", "`.`", $table);
}
+ */
return $table;
}