summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/mssql
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-03-28 12:45:04 +0200
committerAndrey Andreev <narf@bofh.bg>2012-03-28 12:45:04 +0200
commit2cb262ff0ee22f3928e39f19dc0112b9eb26cabc (patch)
tree9ccc0e2dc903ed4b40b7b73d41f5b98dfb45514c /system/database/drivers/mssql
parentc2c4694469be036120156d16364c7a822c744094 (diff)
parent3b2587e1559d2cbe751d04f801f999ef3fa4e74c (diff)
Merge upstream branch
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);