Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
mysqlresult.php
1
<?php
2
namespace
Bitrix\Main\DB
;
3
4
class
MysqlResult
extends
Result
5
{
7
protected
$resultFields
=
null
;
8
14
public
function
__construct
($result,
Connection
$dbConnection, \
Bitrix
\Main\Diag\
SqlTrackerQuery
$trackerQuery
=
null
)
15
{
16
parent::__construct($result, $dbConnection,
$trackerQuery
);
17
}
18
24
public
function
getSelectedRowsCount
()
25
{
26
return
mysql_num_rows($this->resource);
27
}
28
34
public
function
getFields
()
35
{
36
if
($this->resultFields ==
null
)
37
{
38
$this->resultFields = array();
39
if
(is_resource($this->resource))
40
{
41
$numFields = mysql_num_fields($this->resource);
42
if
($numFields > 0 && $this->connection)
43
{
44
$helper = $this->connection->getSqlHelper();
45
for
($i = 0; $i < $numFields; $i++)
46
{
47
$name = mysql_field_name($this->resource, $i);
48
$type = mysql_field_type($this->resource, $i);
49
50
$this->resultFields[$name] = $helper->getFieldByColumnType($name, $type);
51
}
52
}
53
}
54
}
55
return
$this->resultFields
;
56
}
57
63
protected
function
fetchRowInternal
()
64
{
65
return
mysql_fetch_assoc($this->resource);
66
}
67
}
Bitrix\Main\DB\MysqlResult
Definition
mysqlresult.php:5
Bitrix\Main\DB\MysqlResult\getSelectedRowsCount
getSelectedRowsCount()
Definition
mysqlresult.php:24
Bitrix\Main\DB\MysqlResult\fetchRowInternal
fetchRowInternal()
Definition
mysqlresult.php:63
Bitrix\Main\DB\MysqlResult\$resultFields
$resultFields
Definition
mysqlresult.php:7
Bitrix\Main\DB\MysqlResult\__construct
__construct($result, Connection $dbConnection, \Bitrix\Main\Diag\SqlTrackerQuery $trackerQuery=null)
Definition
mysqlresult.php:14
Bitrix\Main\DB\MysqlResult\getFields
getFields()
Definition
mysqlresult.php:34
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
mysqlresult.php
Создано системой
1.10.0