1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
mysqliresult.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Main\DB;
4
5
class
MysqliResult
extends
Result
6
{
8
protected
$resource
;
9
11
private
$resultFields =
null
;
12
18
public
function
__construct
(
$result
,
Connection
$dbConnection =
null
, \
Bitrix
\
Main
\
Diag
\
SqlTrackerQuery
$trackerQuery
=
null
)
19
{
20
parent::__construct(
$result
, $dbConnection,
$trackerQuery
);
21
}
22
28
public
function
getSelectedRowsCount
()
29
{
30
return
$this->resource->num_rows;
31
}
32
38
public
function
getFieldsCount
(): int
39
{
40
return
(
int
) $this->resource->field_count;
41
}
42
48
public
function
getLength
(): int
49
{
50
return
(
int
) array_sum($this->resource->lengths);
51
}
52
56
public
function
hasBigFields
(): bool
57
{
58
if
(is_object($this->resource))
59
{
60
$fields
= $this->resource->fetch_fields();
61
if
(
$fields
&& $this->connection)
62
{
63
$helper = $this->connection->getSqlHelper();
64
foreach
(
$fields
as $field)
65
{
66
if
($helper->isBigType($field->type))
67
{
68
return
true
;
69
}
70
}
71
}
72
}
73
74
return
false
;
75
}
76
82
public
function
getFields
()
83
{
84
if
($this->resultFields ==
null
)
85
{
86
$this->resultFields =
array
();
87
if
(is_object($this->resource))
88
{
89
$fields
= $this->resource->fetch_fields();
90
if
(
$fields
&& $this->connection)
91
{
92
$helper = $this->connection->getSqlHelper();
93
foreach
(
$fields
as $field)
94
{
95
$this->resultFields[$field->name] = $helper->getFieldByColumnType($field->name ?:
'(empty)'
, $field->type);
96
}
97
}
98
}
99
}
100
101
return
$this->resultFields;
102
}
103
109
protected
function
fetchRowInternal
()
110
{
111
return
$this->resource->fetch_assoc();
112
}
113
}
Bitrix\Main\DB\MysqliResult
Определения
mysqliresult.php:6
Bitrix\Main\DB\MysqliResult\__construct
__construct($result, Connection $dbConnection=null, \Bitrix\Main\Diag\SqlTrackerQuery $trackerQuery=null)
Определения
mysqliresult.php:18
Bitrix\Main\DB\MysqliResult\getSelectedRowsCount
getSelectedRowsCount()
Определения
mysqliresult.php:28
Bitrix\Main\DB\MysqliResult\hasBigFields
hasBigFields()
Определения
mysqliresult.php:56
Bitrix\Main\DB\MysqliResult\fetchRowInternal
fetchRowInternal()
Определения
mysqliresult.php:109
Bitrix\Main\DB\MysqliResult\getLength
getLength()
Определения
mysqliresult.php:48
Bitrix\Main\DB\MysqliResult\getFieldsCount
getFieldsCount()
Определения
mysqliresult.php:38
Bitrix\Main\DB\MysqliResult\$resource
$resource
Определения
mysqliresult.php:8
Bitrix\Main\DB\MysqliResult\getFields
getFields()
Определения
mysqliresult.php:82
Bitrix\Main\DB\Result
Определения
result.php:20
Bitrix\Main\DB\Result\$trackerQuery
$trackerQuery
Определения
result.php:26
Bitrix\Main\Data\Connection
Определения
connection.php:17
Bitrix\Main\Diag\SqlTrackerQuery
Определения
sqltrackerquery.php:6
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$result
$result
Определения
get_property_values.php:14
Bitrix\Main\Diag
Определения
cachetracker.php:2
Bitrix\Main
Bitrix
$fields
$fields
Определения
yandex_run.php:501
bitrix
modules
main
lib
db
mysqliresult.php
Создано системой
1.14.0