<?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-tableinsert.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'it',
  ),
  'this' => 
  array (
    0 => 'mysql-xdevapi-tableinsert.execute.php',
    1 => 'TableInsert::execute',
    2 => 'Execute insert query',
  ),
  'up' => 
  array (
    0 => 'class.mysql-xdevapi-tableinsert.php',
    1 => 'mysql_xdevapi\\TableInsert',
  ),
  'prev' => 
  array (
    0 => 'mysql-xdevapi-tableinsert.construct.php',
    1 => 'TableInsert::__construct',
  ),
  'next' => 
  array (
    0 => 'mysql-xdevapi-tableinsert.values.php',
    1 => 'TableInsert::values',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/mysql_xdevapi/mysql_xdevapi/tableinsert/execute.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="mysql-xdevapi-tableinsert.execute" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">TableInsert::execute</h1>
  <p class="verinfo">(No version information available, might only be in Git)</p><p class="refpurpose"><span class="refname">TableInsert::execute</span> &mdash; <span class="dc-title">Execute insert query</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-mysql-xdevapi-tableinsert.execute-description">
  <h3 class="title">Descrizione</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>mysql_xdevapi\TableInsert::execute</strong></span>(): <span class="type"><a href="class.mysql-xdevapi-result.php" class="type mysql_xdevapi\Result">mysql_xdevapi\Result</a></span></div>

  <p class="para rdfs-comment">
   Execute the statement.
  </p>

 </div>


 <div class="refsect1 parameters" id="refsect1-mysql-xdevapi-tableinsert.execute-parameters">
  <h3 class="title">Elenco dei parametri</h3>
  <p class="para">Questa funzione non contiene parametri.</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-mysql-xdevapi-tableinsert.execute-returnvalues">
  <h3 class="title">Valori restituiti</h3>
  <p class="para">
   A Result object.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-mysql-xdevapi-tableinsert.execute-examples">
  <h3 class="title">Esempi</h3>
  <div class="example" id="example-1">
   <p><strong>Example #1 <span class="function"><strong>mysql_xdevapi\TableInsert::execute()</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 addressbook"</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 addressbook"</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 addressbook.names(name text, age int)"</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 addressbook.names values ('John', 42), ('Sam', 33)"</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">"addressbook"</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">"names"</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$table<br />  </span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">insert</span><span style="color: #007700">(</span><span style="color: #DD0000">"name"</span><span style="color: #007700">, </span><span style="color: #DD0000">"age"</span><span style="color: #007700">)<br />  -&gt;</span><span style="color: #0000BB">values</span><span style="color: #007700">([</span><span style="color: #DD0000">"Suzanne"</span><span style="color: #007700">, </span><span style="color: #0000BB">31</span><span style="color: #007700">],[</span><span style="color: #DD0000">"Julie"</span><span style="color: #007700">, </span><span style="color: #0000BB">43</span><span style="color: #007700">])<br />  -&gt;</span><span style="color: #0000BB">execute</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

  </div>
 </div>


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