Documentation

query

\Bitrix\Main\DB\Result public
\Bitrix\Main\DB\Connection::query(
 string $sql,
 array $binds,
 integer $offset,
 integer $limit
);

This non-static method executes the following queries:

  • query($sql)
  • query($sql, $limit)
  • query($sql, $offset, $limit)
  • query($sql, $binds)
  • query($sql, $binds, $limit)
  • query($sql, $binds, $offset, $limit)

Similar methodic the legacy kernel: CDatabase::Query.

Parameters

ParameterDescriptionVersion
$sqlSQL query.
$bindsArray of binds.
$offsetOffset the of the first row to return, starting from 0.
$limitLimit rows count.

Exception

Examples



© «Bitrix24», 2001-2024
Up