summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/sqlsrv/sqlsrv_result.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-11-16 00:27:00 +0100
committerAndrey Andreev <narf@bofh.bg>2012-11-16 00:27:00 +0100
commitf1e1b7789b9adaf0b38b8386c99f46fc37507c8f (patch)
treeaffb83fbbedb2e8e7279fe3edb6682027782d001 /system/database/drivers/sqlsrv/sqlsrv_result.php
parent10ecc84a3215ca02c11855e399a211f4e5cb60b1 (diff)
Improve DB field_data() for MSSQL / SQL Server
Diffstat (limited to 'system/database/drivers/sqlsrv/sqlsrv_result.php')
-rw-r--r--system/database/drivers/sqlsrv/sqlsrv_result.php14
1 files changed, 5 insertions, 9 deletions
diff --git a/system/database/drivers/sqlsrv/sqlsrv_result.php b/system/database/drivers/sqlsrv/sqlsrv_result.php
index 6d24cc995..b084b84cd 100644
--- a/system/database/drivers/sqlsrv/sqlsrv_result.php
+++ b/system/database/drivers/sqlsrv/sqlsrv_result.php
@@ -94,16 +94,12 @@ class CI_DB_sqlsrv_result extends CI_DB_result {
public function field_data()
{
$retval = array();
- foreach (sqlsrv_field_metadata($this->result_id) as $offset => $field)
+ foreach (sqlsrv_field_metadata($this->result_id) as $i => $field)
{
- $F = new stdClass();
- $F->name = $field['Name'];
- $F->type = $field['Type'];
- $F->max_length = $field['Size'];
- $F->primary_key = 0;
- $F->default = '';
-
- $retval[] = $F;
+ $retval[$i] = new stdClass();
+ $retval[$i]->name = $field['Name'];
+ $retval[$i]->type = $field['Type'];
+ $retval[$i]->max_length = $field['Size'];
}
return $retval;