<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.uodbc.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'fr',
  ),
  'this' => 
  array (
    0 => 'function.odbc-exec.php',
    1 => 'odbc_exec',
    2 => 'Ex&eacute;cute directement une requ&ecirc;te SQL',
  ),
  'up' => 
  array (
    0 => 'ref.uodbc.php',
    1 => 'Fonctions ODBC',
  ),
  'prev' => 
  array (
    0 => 'function.odbc-errormsg.php',
    1 => 'odbc_errormsg',
  ),
  'next' => 
  array (
    0 => 'function.odbc-execute.php',
    1 => 'odbc_execute',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'fr',
    'path' => 'reference/uodbc/functions/odbc-exec.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.odbc-exec" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">odbc_exec</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">odbc_exec</span> &mdash; <span class="dc-title">Exécute directement une requête SQL</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.odbc-exec-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>odbc_exec</strong></span>(<span class="methodparam"><span class="type">Odbc\Connection</span> <code class="parameter">$odbc</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"><span class="type">Odbc\Result</span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   <span class="function"><strong>odbc_exec()</strong></span> envoie une commande SQL 
   à la source de données ODBC, représentée par
   <code class="parameter">odbc</code>.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.odbc-exec-parameters">
  <h3 class="title">Liste de paramètres</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">odbc</code></dt>
     <dd>
      <p class="para">L&#039;objet de connexion ODBC,
voir la documentation de la fonction <span class="function"><a href="function.odbc-connect.php" class="function">odbc_connect()</a></span> pour plus
de détails.</p>
     </dd>
    
    
     <dt><code class="parameter">query</code></dt>
     <dd>
      <p class="para">
       La requête SQL.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.odbc-exec-returnvalues">
  <h3 class="title">Valeurs de retour</h3>
  <p class="para">
   Renvoie un objet de résultat ODBC si la commande SQL a été exécutée avec succès
   <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> si une erreur survient.
  </p>
 </div>

 <div class="refsect1 changelog" id="refsect1-function.odbc-exec-changelog">
  <h3 class="title">Historique</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Version</th>
      <th>Description</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
 <td>8.4.0</td>
 <td>
  <code class="parameter">odbc</code> attend désormais une instance de
  <span class="classname"><strong class="classname">Odbc\Connection</strong></span>; auparavant, un <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> était attendu.
 </td>
</tr>

     <tr>
 <td>8.4.0</td>
 <td>
  Cette fonction retourne désormais une instance de
  <span class="classname"><strong class="classname">Odbc\Result</strong></span>; auparavant, un <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> était retourné.
 </td>
</tr>

     <tr>
      <td>8.0.0</td>
      <td>
       <code class="parameter">flags</code> a été supprimé.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>

 <div class="refsect1 seealso" id="refsect1-function.odbc-exec-seealso">
  <h3 class="title">Voir aussi</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.odbc-prepare.php" class="function" rel="rdfs-seeAlso">odbc_prepare()</a> - Pr&eacute;pare une commande pour l'ex&eacute;cution</span></li>
    <li><span class="function"><a href="function.odbc-execute.php" class="function" rel="rdfs-seeAlso">odbc_execute()</a> - Ex&eacute;cute une requ&ecirc;te SQL pr&eacute;par&eacute;e</span></li>
   </ul>
  </p>
 </div>

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