1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
mysqliresult.php
См. документацию.
1<?php
2
3namespace Bitrix\Main\DB;
4
5class 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}
__construct($result, Connection $dbConnection=null, \Bitrix\Main\Diag\SqlTrackerQuery $trackerQuery=null)
Определения mysqliresult.php:18
getSelectedRowsCount()
Определения mysqliresult.php:28
Определения result.php:20
$trackerQuery
Определения result.php:26
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$result
Определения get_property_values.php:14
Определения cachetracker.php:2
$fields
Определения yandex_run.php:501