<?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 => 'de',
  ),
  'this' => 
  array (
    0 => 'mysqli.real-query.php',
    1 => 'mysqli::real_query',
    2 => 'F&uuml;hrt eine SQL-Abfrage aus',
  ),
  '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' => 'de',
    '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">Führt eine SQL-Abfrage aus</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-mysqli.real-query-description">
  <h3 class="title">Beschreibung</h3>
  <p class="para">Objektorientierter Stil</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">Prozeduraler Stil</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">
   Führt eine einzelne Abfrage in der Datenbank aus, deren Ergebnis dann mit
   den Funktionen <span class="function"><a href="mysqli.store-result.php" class="function">mysqli_store_result()</a></span> oder
   <span class="function"><a href="mysqli.use-result.php" class="function">mysqli_use_result()</a></span> abgerufen oder gespeichert werden
   kann.
  </p>
  <div class="warning"><strong class="warning">Warnung</strong>
<h1 class="title">Sicherheitswarnung: SQL-Injection</h1><p class="para">Wenn die Abfrage
irgendwelche Eingabevariablen enthält, sollten stattdessen
<a href="mysqli.quickstart.prepared-statements.php" class="link">parametrisierte Prepared Statements</a>
verwendet werden. Alternativ dazu müssen die Daten korrekt formatiert sein und
alle Strings müssen mit der Funktion
<span class="function"><a href="mysqli.real-escape-string.php" class="function">mysqli_real_escape_string()</a></span> maskiert werden.</p></div>
  <p class="para">
   Um festzustellen, ob von einer bestimmten Abfrage eine Ergebnismenge zu
   erwarten ist oder nicht, siehe <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">Parameter-Liste</h3>
  <p class="para">
   <dl>
    <dt>
<code class="parameter">mysql</code></dt><dd><p class="para">Nur bei prozeduralem Aufruf: ein von
<span class="function"><a href="function.mysqli-connect.php" class="function">mysqli_connect()</a></span> oder <span class="function"><a href="mysqli.init.php" class="function">mysqli_init()</a></span>
zurückgegebenes <span class="classname"><a href="class.mysqli.php" class="classname">mysqli</a></span>-Objekt.</p></dd>
    
     <dt><code class="parameter">query</code></dt>
     <dd>
      <p class="para">
       Die Zeichenkette für die Abfrage
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-mysqli.real-query-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   Gibt bei Erfolg <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> zurück. Bei einem Fehler wird <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> zurückgegeben.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-mysqli.real-query-errors">
  <h3 class="title">Fehler/Exceptions</h3>
  <p class="para">
If mysqli error reporting is enabled (<strong><code><a href="mysqli.constants.php#constant.mysqli-report-error">MYSQLI_REPORT_ERROR</a></code></strong>) and the requested operation fails,
a warning is generated. If, in addition, the mode is set to <strong><code><a href="mysqli.constants.php#constant.mysqli-report-strict">MYSQLI_REPORT_STRICT</a></code></strong>,
a <span class="classname"><a href="class.mysqli-sql-exception.php" class="classname">mysqli_sql_exception</a></span> is thrown instead.</p>
 </div>


 <div class="refsect1 seealso" id="refsect1-mysqli.real-query-seealso">
  <h3 class="title">Siehe auch</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="mysqli.query.php" class="function" rel="rdfs-seeAlso">mysqli_query()</a> - F&uuml;hrt eine Abfrage in einer Datenbank durch</span></li>
    <li><span class="function"><a href="mysqli.store-result.php" class="function" rel="rdfs-seeAlso">mysqli_store_result()</a> - &Uuml;bertr&auml;gt die Ergebnismenge der letzten Abfrage</span></li>
    <li><span class="function"><a href="mysqli.use-result.php" class="function" rel="rdfs-seeAlso">mysqli_use_result()</a> - Initiiert den Abruf einer Ergebnismenge</span></li>
   </ul>
  </p>
 </div>


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