summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/sqlsrv/sqlsrv_result.php
diff options
context:
space:
mode:
authorAlex Bilbie <alex.bilbie@gmail.com>2011-03-18 20:48:04 +0100
committerAlex Bilbie <alex.bilbie@gmail.com>2011-03-18 20:48:04 +0100
commit3a43c7adae7737d68a0eeca663cc2dd3fc5b0cf3 (patch)
treee6e63765737ff39bf3b0c8ddff12641abe33a3ab /system/database/drivers/sqlsrv/sqlsrv_result.php
parent01ab00469c80a26c22c61f896f0514dfcedccb67 (diff)
Updates
Diffstat (limited to 'system/database/drivers/sqlsrv/sqlsrv_result.php')
-rw-r--r--system/database/drivers/sqlsrv/sqlsrv_result.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/system/database/drivers/sqlsrv/sqlsrv_result.php b/system/database/drivers/sqlsrv/sqlsrv_result.php
index 458200383..bf0abd1c6 100644
--- a/system/database/drivers/sqlsrv/sqlsrv_result.php
+++ b/system/database/drivers/sqlsrv/sqlsrv_result.php
@@ -63,11 +63,11 @@ class CI_DB_sqlsrv_result extends CI_DB_result {
function list_fields()
{
$field_names = array();
- while ($field = sqlsrv_get_field($this->result_id))
+ foreach(sqlsrv_field_metadata($this->result_id) as $offset => $field)
{
- $field_names[] = $field->name;
+ $field_names[] = $field['Name'];
}
-
+
return $field_names;
}
@@ -84,18 +84,18 @@ class CI_DB_sqlsrv_result extends CI_DB_result {
function field_data()
{
$retval = array();
- while ($field = sqlsrv_get_field($this->result_id))
+ foreach(sqlsrv_field_metadata($this->result_id) as $offset => $field)
{
- $F = new stdClass();
- $F->name = $field->name;
- $F->type = $field->type;
- $F->max_length = $field->max_length;
+ $F = new stdClass();
+ $F->name = $field['Name'];
+ $F->type = $field['Type'];
+ $F->max_length = $field['Size'];
$F->primary_key = 0;
$F->default = '';
-
+
$retval[] = $F;
}
-
+
return $retval;
}