<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.mysqli.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'uk',
  ),
  'this' => 
  array (
    0 => 'mysqli.real-query.php',
    1 => 'mysqli::real_query',
    2 => 'Execute an SQL query',
  ),
  'up' => 
  array (
    0 => 'class.mysqli.php',
    1 => 'mysqli',
  ),
  'prev' => 
  array (
    0 => 'mysqli.real-escape-string.php',
    1 => 'mysqli::real_escape_string',
  ),
  'next' => 
  array (
    0 => 'mysqli.reap-async-query.php',
    1 => 'mysqli::reap_async_query',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/mysqli/mysqli/real-query.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="mysqli.real-query" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">mysqli::real_query</h1>
  <h1 class="refname">mysqli_real_query</h1>
  <p class="verinfo">(PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">mysqli::real_query</span> -- <span class="refname">mysqli_real_query</span> &mdash; <span class="dc-title">Execute an SQL query</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-mysqli.real-query-description">
  <h3 class="title">Опис</h3>
  <p class="para">Об&#039;єктно-орієнтований стиль</p>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>mysqli::real_query</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$query</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">Процедурний стиль</p>
  <div class="methodsynopsis dc-description"><span class="methodname"><strong>mysqli_real_query</strong></span>(<span class="methodparam"><span class="type"><a href="class.mysqli.php" class="type mysqli">mysqli</a></span> <code class="parameter">$mysql</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$query</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   Executes a single query against the database whose result can then be
   retrieved or stored using the <span class="function"><a href="mysqli.store-result.php" class="function">mysqli_store_result()</a></span> or
   <span class="function"><a href="mysqli.use-result.php" class="function">mysqli_use_result()</a></span> functions.
  </p>
  <div class="warning"><strong class="warning">Увага</strong><h1 class="title">Попередження з безпеки:
SQL-ін&#039;єкція</h1><p class="para">Якщо рядок запиту має містити введені
користувачем значення, то потрібно виконати <a href="mysqli.quickstart.prepared-statements.php" class="link">підготовлений запит</a>. Або
ж дані мають бути правильно відформатовані, а всі рядки — екрановані функцією
<span class="function"><a href="mysqli.real-escape-string.php" class="function">mysqli_real_escape_string()</a></span>.</p></div>
  <p class="para">
   In order to determine if a given query should return a result set or not,
   see <span class="function"><a href="mysqli.field-count.php" class="function">mysqli_field_count()</a></span>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-mysqli.real-query-parameters">
  <h3 class="title">Параметри</h3>
  <p class="para">
   <dl>
    <dt>
<code class="parameter">mysql</code></dt><dd><p class="para">Тільки процедурний стиль:
об&#039;єкт <span class="classname"><a href="class.mysqli.php" class="classname">mysqli</a></span>, якого повертає функція
<span class="function"><a href="function.mysqli-connect.php" class="function">mysqli_connect()</a></span> або
<span class="function"><a href="mysqli.init.php" class="function">mysqli_init()</a></span></p></dd>
    
     <dt><code class="parameter">query</code></dt>
     <dd>
      <p class="para">
       The query string.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-mysqli.real-query-returnvalues">
  <h3 class="title">Значення, що повертаються</h3>
  <p class="para">
   Повертає <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> у разі успіху або <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> в разі помилки.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-mysqli.real-query-errors">
  <h3 class="title">Помилки/виключення</h3>
  <p class="para"> Якщо увімкнені звіти про помилки
mysqli (<strong><code><a href="mysqli.constants.php#constant.mysqli-report-error">MYSQLI_REPORT_ERROR</a></code></strong>) і запитана операція не
виконалась, буде виведено попередження, але якщо встановлено режим
<strong><code><a href="mysqli.constants.php#constant.mysqli-report-strict">MYSQLI_REPORT_STRICT</a></code></strong>, буде викинуто виключення
<span class="classname"><a href="class.mysqli-sql-exception.php" class="classname">mysqli_sql_exception</a></span>.</p>
 </div>


 <div class="refsect1 seealso" id="refsect1-mysqli.real-query-seealso">
  <h3 class="title">Прогляньте також</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="mysqli.query.php" class="function" rel="rdfs-seeAlso">mysqli_query()</a> - Performs a query on the database</span></li>
    <li><span class="function"><a href="mysqli.store-result.php" class="function" rel="rdfs-seeAlso">mysqli_store_result()</a> - Transfers a result set from the last query</span></li>
    <li><span class="function"><a href="mysqli.use-result.php" class="function" rel="rdfs-seeAlso">mysqli_use_result()</a> - Initiate a result set retrieval</span></li>
   </ul>
  </p>
 </div>


</div><?php manual_footer($setup); ?>