Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
mssqlresult.php
1
<?php
2
namespace
Bitrix\Main\DB
;
3
4
class
MssqlResult
extends
Result
5
{
7
private
$resultFields =
null
;
8
14
public
function
__construct
($result,
Connection
$dbConnection =
null
, \
Bitrix
\Main\Diag\
SqlTrackerQuery
$trackerQuery
=
null
)
15
{
16
parent::__construct($result, $dbConnection,
$trackerQuery
);
17
}
18
24
public
function
getFields
()
25
{
26
if
($this->resultFields ==
null
)
27
{
28
$this->resultFields = array();
29
if
(is_resource($this->resource))
30
{
31
$fields = sqlsrv_field_metadata($this->resource);
32
if
($fields && $this->connection)
33
{
34
$helper = $this->connection->getSqlHelper();
35
foreach
($fields as $value)
36
{
37
$name = ($value[
"Name"
] <>
''
? $value[
"Name"
]: uniqid());
38
$parameters = array(
39
"size"
=> $value[
"Size"
],
40
"scale"
=> $value[
"Scale"
],
41
);
42
$this->resultFields[$name] = $helper->getFieldByColumnType($name, $value[
"Type"
], $parameters);
43
}
44
}
45
}
46
}
47
48
return
$this->resultFields;
49
}
50
56
public
function
getSelectedRowsCount
()
57
{
58
return
sqlsrv_num_rows($this->resource);
59
}
60
66
protected
function
fetchRowInternal
()
67
{
68
return
sqlsrv_fetch_array($this->resource, SQLSRV_FETCH_ASSOC);
69
}
70
}
Bitrix\Main\DB\MssqlResult
Definition
mssqlresult.php:5
Bitrix\Main\DB\MssqlResult\__construct
__construct($result, Connection $dbConnection=null, \Bitrix\Main\Diag\SqlTrackerQuery $trackerQuery=null)
Definition
mssqlresult.php:14
Bitrix\Main\DB\MssqlResult\getSelectedRowsCount
getSelectedRowsCount()
Definition
mssqlresult.php:56
Bitrix\Main\DB\MssqlResult\fetchRowInternal
fetchRowInternal()
Definition
mssqlresult.php:66
Bitrix\Main\DB\MssqlResult\getFields
getFields()
Definition
mssqlresult.php:24
Bitrix\Main\DB\Result
Definition
result.php:19
Bitrix\Main\DB\Result\$trackerQuery
$trackerQuery
Definition
result.php:25
Bitrix\Main\Data\Connection
Definition
connection.php:17
Bitrix\Main\Diag\SqlTrackerQuery
Definition
sqltrackerquery.php:5
Bitrix\Main\DB
Definition
arrayresult.php:2
Bitrix
modules
main
lib
db
mssqlresult.php
Создано системой
1.10.0