summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/mssql
diff options
context:
space:
mode:
Diffstat (limited to 'system/database/drivers/mssql')
-rw-r--r--system/database/drivers/mssql/mssql_driver.php27
1 files changed, 4 insertions, 23 deletions
diff --git a/system/database/drivers/mssql/mssql_driver.php b/system/database/drivers/mssql/mssql_driver.php
index 4a1e4ff23..2053ddb60 100644
--- a/system/database/drivers/mssql/mssql_driver.php
+++ b/system/database/drivers/mssql/mssql_driver.php
@@ -61,7 +61,7 @@ class CI_DB_mssql_driver extends CI_DB {
{
parent::__construct($params);
- if ( ! empty($this->port) && ctype_digit($this->port))
+ if ( ! empty($this->port))
{
$this->hostname .= (DIRECTORY_SEPARATOR === '\\' ? ',' : ':').$this->port;
}
@@ -92,21 +92,6 @@ class CI_DB_mssql_driver extends CI_DB {
// --------------------------------------------------------------------
/**
- * Reconnect
- *
- * Keep / reestablish the db connection if no queries have been
- * sent for a length of time exceeding the server's idle timeout
- *
- * @return void
- */
- public function reconnect()
- {
- // Not supported in MSSQL
- }
-
- // --------------------------------------------------------------------
-
- /**
* Select the database
*
* @param string database name
@@ -537,13 +522,9 @@ class CI_DB_mssql_driver extends CI_DB {
$conditions = '';
if (count($where) > 0 OR count($like) > 0)
{
- $conditions .= "\nWHERE ".implode("\n", $this->ar_where);
-
- if (count($where) > 0 && count($like) > 0)
- {
- $conditions .= ' AND ';
- }
- $conditions .= implode("\n", $like);
+ $conditions .= "\nWHERE ".implode("\n", $this->ar_where)
+ .((count($where) > 0 && count($like) > 0) ? ' AND ' : '')
+ .implode("\n", $like);
}
return 'DELETE FROM '.$table.$conditions.( ! $limit ? '' : ' LIMIT '.$limit);