summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/mssql
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-03-20 15:11:52 +0100
committerAndrey Andreev <narf@bofh.bg>2012-03-20 15:11:52 +0100
commitc2c4694469be036120156d16364c7a822c744094 (patch)
treec00ba55ae279443718a868a4a87d2c0dffca75ed /system/database/drivers/mssql
parent242500d51695e4177ec99a3221086f51f55c8862 (diff)
parentc066481ed558e764ab489449141d2489551b562f (diff)
Merge upstream branch
Diffstat (limited to 'system/database/drivers/mssql')
-rw-r--r--system/database/drivers/mssql/mssql_driver.php63
-rw-r--r--system/database/drivers/mssql/mssql_forge.php6
-rw-r--r--system/database/drivers/mssql/mssql_result.php6
-rw-r--r--system/database/drivers/mssql/mssql_utility.php4
4 files changed, 32 insertions, 47 deletions
diff --git a/system/database/drivers/mssql/mssql_driver.php b/system/database/drivers/mssql/mssql_driver.php
index 4d656f16e..4a1e4ff23 100644
--- a/system/database/drivers/mssql/mssql_driver.php
+++ b/system/database/drivers/mssql/mssql_driver.php
@@ -2,7 +2,7 @@
/**
* CodeIgniter
*
- * An open source application development framework for PHP 5.1.6 or newer
+ * An open source application development framework for PHP 5.2.4 or newer
*
* NOTICE OF LICENSE
*
@@ -46,7 +46,7 @@ class CI_DB_mssql_driver extends CI_DB {
protected $_escape_char = '';
// clause and character used for LIKE escape sequences
- protected $_like_escape_str = ' ESCAPE \'%s\' ';
+ protected $_like_escape_str = " ESCAPE '%s' ";
protected $_like_escape_chr = '!';
/**
@@ -140,22 +140,7 @@ class CI_DB_mssql_driver extends CI_DB {
*/
protected function _execute($sql)
{
- return @mssql_query($this->_prep_query($sql), $this->conn_id);
- }
-
- // --------------------------------------------------------------------
-
- /**
- * Prep the query
- *
- * If needed, each database adapter can prep the query string
- *
- * @param string an SQL query
- * @return string
- */
- protected function _prep_query($sql)
- {
- return $sql;
+ return @mssql_query($sql, $this->conn_id);
}
// --------------------------------------------------------------------
@@ -269,12 +254,12 @@ class CI_DB_mssql_driver extends CI_DB {
// --------------------------------------------------------------------
/**
- * Insert ID
- *
- * Returns the last id created in the Identity column.
- *
- * @return int
- */
+ * Insert ID
+ *
+ * Returns the last id created in the Identity column.
+ *
+ * @return string
+ */
public function insert_id()
{
$query = (self::_parse_major_version($this->version()) > 7)
@@ -289,14 +274,14 @@ class CI_DB_mssql_driver extends CI_DB {
// --------------------------------------------------------------------
/**
- * Parse major version
- *
- * Grabs the major version number from the
- * database server version string passed in.
- *
- * @param string $version
- * @return int major version number
- */
+ * Parse major version
+ *
+ * Grabs the major version number from the
+ * database server version string passed in.
+ *
+ * @param string $version
+ * @return int major version number
+ */
protected function _parse_major_version($version)
{
preg_match('/([0-9]+)\.([0-9]+)\.([0-9]+)/', $version, $ver_info);
@@ -306,10 +291,10 @@ class CI_DB_mssql_driver extends CI_DB {
// --------------------------------------------------------------------
/**
- * Version number query string
- *
- * @return string
- */
+ * Version number query string
+ *
+ * @return string
+ */
protected function _version()
{
return 'SELECT @@VERSION AS ver';
@@ -572,8 +557,8 @@ class CI_DB_mssql_driver extends CI_DB {
* Generates a platform-specific LIMIT clause
*
* @param string the sql query string
- * @param integer the number of rows to limit the query to
- * @param integer the offset value
+ * @param int the number of rows to limit the query to
+ * @param int the offset value
* @return string
*/
protected function _limit($sql, $limit, $offset)
@@ -597,4 +582,4 @@ class CI_DB_mssql_driver extends CI_DB {
}
/* End of file mssql_driver.php */
-/* Location: ./system/database/drivers/mssql/mssql_driver.php */
+/* Location: ./system/database/drivers/mssql/mssql_driver.php */ \ No newline at end of file
diff --git a/system/database/drivers/mssql/mssql_forge.php b/system/database/drivers/mssql/mssql_forge.php
index 907e7e737..4312b22c9 100644
--- a/system/database/drivers/mssql/mssql_forge.php
+++ b/system/database/drivers/mssql/mssql_forge.php
@@ -2,7 +2,7 @@
/**
* CodeIgniter
*
- * An open source application development framework for PHP 5.1.6 or newer
+ * An open source application development framework for PHP 5.2.4 or newer
*
* NOTICE OF LICENSE
*
@@ -63,7 +63,7 @@ class CI_DB_mssql_forge extends CI_DB_forge {
/**
* Drop Table
*
- * @param string the table name
+ * @param string table name
* @return string
*/
public function _drop_table($table)
@@ -95,7 +95,7 @@ class CI_DB_mssql_forge extends CI_DB_forge {
$sql .= $this->db->_escape_identifiers($table).'(';
$current_field_count = 0;
- foreach ($fields as $field=>$attributes)
+ foreach ($fields as $field => $attributes)
{
// Numeric field names aren't allowed in databases, so if the key is
// numeric, we know it was assigned by PHP and the developer manually
diff --git a/system/database/drivers/mssql/mssql_result.php b/system/database/drivers/mssql/mssql_result.php
index 579cd3de7..0738654a8 100644
--- a/system/database/drivers/mssql/mssql_result.php
+++ b/system/database/drivers/mssql/mssql_result.php
@@ -2,7 +2,7 @@
/**
* CodeIgniter
*
- * An open source application development framework for PHP 5.1.6 or newer
+ * An open source application development framework for PHP 5.2.4 or newer
*
* NOTICE OF LICENSE
*
@@ -132,7 +132,7 @@ class CI_DB_mssql_result extends CI_DB_result {
*
* @return array
*/
- public function _data_seek($n = 0)
+ protected function _data_seek($n = 0)
{
return mssql_data_seek($this->result_id, $n);
}
@@ -168,4 +168,4 @@ class CI_DB_mssql_result extends CI_DB_result {
}
/* End of file mssql_result.php */
-/* Location: ./system/database/drivers/mssql/mssql_result.php */
+/* Location: ./system/database/drivers/mssql/mssql_result.php */ \ No newline at end of file
diff --git a/system/database/drivers/mssql/mssql_utility.php b/system/database/drivers/mssql/mssql_utility.php
index 11a1b3ad0..06581f772 100644
--- a/system/database/drivers/mssql/mssql_utility.php
+++ b/system/database/drivers/mssql/mssql_utility.php
@@ -2,7 +2,7 @@
/**
* CodeIgniter
*
- * An open source application development framework for PHP 5.1.6 or newer
+ * An open source application development framework for PHP 5.2.4 or newer
*
* NOTICE OF LICENSE
*
@@ -93,4 +93,4 @@ class CI_DB_mssql_utility extends CI_DB_utility {
}
/* End of file mssql_utility.php */
-/* Location: ./system/database/drivers/mssql/mssql_utility.php */
+/* Location: ./system/database/drivers/mssql/mssql_utility.php */ \ No newline at end of file