<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.mysql-xdevapi-columnresult.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'tr',
  ),
  'this' => 
  array (
    0 => 'mysql-xdevapi-columnresult.construct.php',
    1 => 'ColumnResult::__construct',
    2 => 'ColumnResult constructor',
  ),
  'up' => 
  array (
    0 => 'class.mysql-xdevapi-columnresult.php',
    1 => 'mysql_xdevapi\\ColumnResult',
  ),
  'prev' => 
  array (
    0 => 'class.mysql-xdevapi-columnresult.php',
    1 => 'mysql_xdevapi\\ColumnResult',
  ),
  'next' => 
  array (
    0 => 'mysql-xdevapi-columnresult.getcharactersetname.php',
    1 => 'ColumnResult::getCharacterSetName',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/mysql_xdevapi/mysql_xdevapi/columnresult/construct.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="mysql-xdevapi-columnresult.construct" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ColumnResult::__construct</h1>
  <p class="verinfo">(No version information available, might only be in Git)</p><p class="refpurpose"><span class="refname">ColumnResult::__construct</span> &mdash; <span class="dc-title">ColumnResult constructor</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-mysql-xdevapi-columnresult.construct-description">
  <h3 class="title">Açıklama</h3>
  <div class="constructorsynopsis dc-description">
   <span class="modifier">private</span> <span class="methodname"><strong>mysql_xdevapi\ColumnResult::__construct</strong></span>()</div>

  <p class="para rdfs-comment">
   Retrieves column metadata, such as its character set; this is instantiated
   by the <span class="methodname"><strong>mysql_xdevapi\RowResult::getColumns()</strong></span> method.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-mysql-xdevapi-columnresult.construct-parameters">
  <h3 class="title">Bağımsız Değişkenler</h3>
  <p class="para">Bu işlevin bağımsız değişkeni yoktur.</p>
 </div>


 <div class="refsect1 examples" id="refsect1-mysql-xdevapi-columnresult.construct-examples">
  <h3 class="title">Örnekler</h3>
  <div class="example" id="example-1">
   <p><strong>Örnek 1 <span class="function"><strong>mysql_xdevapi\ColumnResult::__construct()</strong></span> example</strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$session </span><span style="color: #007700">= </span><span style="color: #0000BB">mysql_xdevapi\getSession</span><span style="color: #007700">(</span><span style="color: #DD0000">"mysqlx://user:password@localhost"</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$session</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">sql</span><span style="color: #007700">(</span><span style="color: #DD0000">"DROP DATABASE IF EXISTS nonsense"</span><span style="color: #007700">)-&gt;</span><span style="color: #0000BB">execute</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">$session</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">sql</span><span style="color: #007700">(</span><span style="color: #DD0000">"CREATE DATABASE nonsense"</span><span style="color: #007700">)-&gt;</span><span style="color: #0000BB">execute</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">$session</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">sql</span><span style="color: #007700">(</span><span style="color: #DD0000">"CREATE TABLE nonsense.numbers (hello int, world float unsigned)"</span><span style="color: #007700">)-&gt;</span><span style="color: #0000BB">execute</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">$session</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">sql</span><span style="color: #007700">(</span><span style="color: #DD0000">"INSERT INTO  nonsense.numbers values (42, 42)"</span><span style="color: #007700">)-&gt;</span><span style="color: #0000BB">execute</span><span style="color: #007700">();<br /><br /></span><span style="color: #0000BB">$schema </span><span style="color: #007700">= </span><span style="color: #0000BB">$session</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getSchema</span><span style="color: #007700">(</span><span style="color: #DD0000">"nonsense"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$table  </span><span style="color: #007700">= </span><span style="color: #0000BB">$schema</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getTable</span><span style="color: #007700">(</span><span style="color: #DD0000">"numbers"</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$result1 </span><span style="color: #007700">= </span><span style="color: #0000BB">$table</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">select</span><span style="color: #007700">(</span><span style="color: #DD0000">'hello'</span><span style="color: #007700">,</span><span style="color: #DD0000">'world'</span><span style="color: #007700">)-&gt;</span><span style="color: #0000BB">execute</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">// Returns an array of ColumnResult objects<br /></span><span style="color: #0000BB">$columns </span><span style="color: #007700">= </span><span style="color: #0000BB">$result1</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getColumns</span><span style="color: #007700">(); <br /><br />foreach (</span><span style="color: #0000BB">$columns </span><span style="color: #007700">as </span><span style="color: #0000BB">$column</span><span style="color: #007700">) {<br />    echo </span><span style="color: #DD0000">"\nColumn label " </span><span style="color: #007700">, </span><span style="color: #0000BB">$column</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getColumnLabel</span><span style="color: #007700">();<br />    echo </span><span style="color: #DD0000">" is type "       </span><span style="color: #007700">, </span><span style="color: #0000BB">$column</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getType</span><span style="color: #007700">();<br />    echo </span><span style="color: #DD0000">" and is "</span><span style="color: #007700">, (</span><span style="color: #0000BB">$column</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">isNumberSigned</span><span style="color: #007700">() === </span><span style="color: #0000BB">0</span><span style="color: #007700">) ? </span><span style="color: #DD0000">"unsigned." </span><span style="color: #007700">: </span><span style="color: #DD0000">"signed."</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #FF8000">// Alternatively<br /></span><span style="color: #0000BB">$result2 </span><span style="color: #007700">= </span><span style="color: #0000BB">$session</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">sql</span><span style="color: #007700">(</span><span style="color: #DD0000">"SELECT * FROM nonsense.numbers"</span><span style="color: #007700">)-&gt;</span><span style="color: #0000BB">execute</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">// Returns an array of FieldMetadata objects<br /></span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">$result2</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getColumns</span><span style="color: #007700">());</span></span></code></div>
   </div>

   <div class="example-contents"><p>
Yukarıdaki örnek şuna benzer bir çıktı üretir:</p></div>
   <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">Column label hello is type 19 and is signed.
Column label world is type 4  and is unsigned.

Array
(
    [0] =&gt; mysql_xdevapi\FieldMetadata Object
        (
            [type] =&gt; 1
            [type_name] =&gt; SINT
            [name] =&gt; hello
            [original_name] =&gt; hello
            [table] =&gt; numbers
            [original_table] =&gt; numbers
            [schema] =&gt; nonsense
            [catalog] =&gt; def
            [collation] =&gt; 0
            [fractional_digits] =&gt; 0
            [length] =&gt; 11
            [flags] =&gt; 0
            [content_type] =&gt; 0
        )
    [1] =&gt; mysql_xdevapi\FieldMetadata Object
        (
            [type] =&gt; 6
            [type_name] =&gt; FLOAT
            [name] =&gt; world
            [original_name] =&gt; world
            [table] =&gt; numbers
            [original_table] =&gt; numbers
            [schema] =&gt; nonsense
            [catalog] =&gt; def
            [collation] =&gt; 0
            [fractional_digits] =&gt; 31
            [length] =&gt; 12
            [flags] =&gt; 1
            [content_type] =&gt; 0
        )
)</pre>
</div>
   </div>
  </div>
 </div>


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