<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.mysqli-result.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'tr',
  ),
  'this' => 
  array (
    0 => 'mysqli-result.construct.php',
    1 => 'mysqli_result::__construct',
    2 => 'Constructs a mysqli_result object',
  ),
  'up' => 
  array (
    0 => 'class.mysqli-result.php',
    1 => 'mysqli_result',
  ),
  'prev' => 
  array (
    0 => 'class.mysqli-result.php',
    1 => 'mysqli_result',
  ),
  'next' => 
  array (
    0 => 'mysqli-result.current-field.php',
    1 => 'mysqli_result::$current_field',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/mysqli/mysqli_result/construct.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="mysqli-result.construct" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">mysqli_result::__construct</h1>
  <p class="verinfo">(PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">mysqli_result::__construct</span> &mdash; <span class="dc-title">Constructs a <span class="classname"><a href="class.mysqli-result.php" class="classname">mysqli_result</a></span> object</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-mysqli-result.construct-description">
  <h3 class="title">Açıklama</h3>
  <div class="constructorsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>mysqli_result::__construct</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.integer.php" class="type int">int</a></span> <code class="parameter">$result_mode</code><span class="initializer"> = <strong><code><a href="mysqli.constants.php#constant.mysqli-store-result">MYSQLI_STORE_RESULT</a></code></strong></span></span>)</div>

  <p class="para rdfs-comment">
   This method constructs a new <span class="classname"><a href="class.mysqli-result.php" class="classname">mysqli_result</a></span> object.
  </p>
  <p class="para">
   It can be used to create the <span class="classname"><a href="class.mysqli-result.php" class="classname">mysqli_result</a></span> object
   after calling the <span class="function"><a href="mysqli.real-query.php" class="function">mysqli_real_query()</a></span> or
   <span class="function"><a href="mysqli.multi-query.php" class="function">mysqli_multi_query()</a></span> function. Constructing the object
   manually is equivalent to calling 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> function.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-mysqli-result.construct-parameters">
  <h3 class="title">Bağımsız Değişkenler</h3>
  <dl>
   
<dt><code class="parameter">bağlantı</code></dt><dd><p class="para">
Sadece yordamsal tarz: <span class="function"><a href="function.mysqli-connect.php" class="function">mysqli_connect()</a></span> veya
<span class="function"><a href="mysqli.init.php" class="function">mysqli_init()</a></span> işlevinden dönen bir
<span class="classname"><a href="class.mysqli.php" class="classname">mysqli</a></span> nesnesi.
</p></dd>
   
    <dt><code class="parameter">result_mode</code></dt>
    <dd>
     <p class="para">
      The result mode can be one of 2 constants indicating how the result will
      be returned from the MySQL server.
     </p>
     <p class="para">
      <strong><code><a href="mysqli.constants.php#constant.mysqli-store-result">MYSQLI_STORE_RESULT</a></code></strong> (default) - creates a
      <span class="classname"><a href="class.mysqli-result.php" class="classname">mysqli_result</a></span> object with buffered result set.
     </p>
     <p class="para">
      <strong><code><a href="mysqli.constants.php#constant.mysqli-use-result">MYSQLI_USE_RESULT</a></code></strong> - creates a
      <span class="classname"><a href="class.mysqli-result.php" class="classname">mysqli_result</a></span> object with unbuffered result set. 
      As long as there are pending records waiting to be fetched, the
      connection line will be busy and all subsequent calls will return error 
      <code class="literal">Commands out of sync</code>. To avoid the error all records 
      must be fetched from the server or the result set must be discarded by
      calling <span class="function"><a href="mysqli-result.free.php" class="function">mysqli_free_result()</a></span>. The connection must
      remain open for the rows to be fetched.
     </p>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 errors" id="refsect1-mysqli-result.construct-errors">
  <h3 class="title">Hatalar/İstisnalar</h3>
  <p class="para">
Eğer mysqli hata bildirimi etkinse (<strong><code><a href="mysqli.constants.php#constant.mysqli-report-error">MYSQLI_REPORT_ERROR</a></code></strong>)
ve istenen işlem başarısız olursa bir uyarı üretilir. Ek olarak, kip
<strong><code><a href="mysqli.constants.php#constant.mysqli-report-strict">MYSQLI_REPORT_STRICT</a></code></strong> ise bunun yerine
<span class="classname"><a href="class.mysqli-sql-exception.php" class="classname">mysqli_sql_exception</a></span> istisnası oluşur.</p>
 </div>


 <div class="refsect1 examples" id="refsect1-mysqli-result.construct-examples">
  <h3 class="title">Örnekler</h3>
  <div class="example" id="example-1">
   <p><strong>Örnek 1 Creation of a <span class="classname"><a href="class.mysqli-result.php" class="classname">mysqli_result</a></span> object</strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /><br />mysqli_report</span><span style="color: #007700">(</span><span style="color: #0000BB">MYSQLI_REPORT_ERROR </span><span style="color: #007700">| </span><span style="color: #0000BB">MYSQLI_REPORT_STRICT</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$mysqli </span><span style="color: #007700">= new </span><span style="color: #0000BB">mysqli</span><span style="color: #007700">(</span><span style="color: #DD0000">"localhost"</span><span style="color: #007700">, </span><span style="color: #DD0000">"my_user"</span><span style="color: #007700">, </span><span style="color: #DD0000">"my_password"</span><span style="color: #007700">, </span><span style="color: #DD0000">"world"</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">/* Select queries return a result set */<br /></span><span style="color: #0000BB">$mysqli</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">real_query</span><span style="color: #007700">(</span><span style="color: #DD0000">"SELECT Name FROM City LIMIT 10"</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$result </span><span style="color: #007700">= new </span><span style="color: #0000BB">mysqli_result</span><span style="color: #007700">(</span><span style="color: #0000BB">$mysqli</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">printf</span><span style="color: #007700">(</span><span style="color: #DD0000">"Select returned %d rows.\n"</span><span style="color: #007700">, </span><span style="color: #0000BB">$result</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">num_rows</span><span style="color: #007700">);</span></span></code></div>
   </div>

   <div class="example-contents"><p>The above examples will output
something similar to:</p></div>
   <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">Select returned 10 rows.</pre>
</div>
   </div>
  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-mysqli-result.construct-seealso">
  <h3 class="title">Ayrıca Bakınız</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="mysqli.multi-query.php" class="function" rel="rdfs-seeAlso">mysqli_multi_query()</a> - Performs one or more queries on the database</span></li>
    <li><span class="function"><a href="mysqli.real-query.php" class="function" rel="rdfs-seeAlso">mysqli_real_query()</a> - Execute an SQL query</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); ?>