mirror of
https://github.com/dg/dibi.git
synced 2025-08-05 05:37:39 +02:00
Fix DibiMsSql2005Driver::getResultColumns()
This commit is contained in:
committed by
David Grudl
parent
7c47f57e30
commit
a606be0efa
@@ -375,14 +375,12 @@ class DibiMsSql2005Driver extends DibiObject implements IDibiDriver, IDibiResult
|
|||||||
*/
|
*/
|
||||||
public function getResultColumns()
|
public function getResultColumns()
|
||||||
{
|
{
|
||||||
$count = sqlsrv_num_fields($this->resultSet);
|
|
||||||
$columns = array();
|
$columns = array();
|
||||||
for ($i = 0; $i < $count; $i++) {
|
foreach ((array) sqlsrv_field_metadata($this->resultSet) AS $fieldMetadata) {
|
||||||
$row = (array) sqlsrv_field_metadata($this->resultSet, $i);
|
|
||||||
$columns[] = array(
|
$columns[] = array(
|
||||||
'name' => $row['Name'],
|
'name' => $fieldMetadata['Name'],
|
||||||
'fullname' => $row['Name'],
|
'fullname' => $fieldMetadata['Name'],
|
||||||
'nativetype' => $row['Type'],
|
'nativetype' => $fieldMetadata['Type'],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return $columns;
|
return $columns;
|
||||||
|
Reference in New Issue
Block a user