<?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 => 'ru',
  ),
  'this' => 
  array (
    0 => 'function.odbc-exec.php',
    1 => 'odbc_exec',
    2 => 'Выполняет прямой SQL-запрос',
  ),
  'up' => 
  array (
    0 => 'ref.uodbc.php',
    1 => 'Функции 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' => 'ru',
    '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">Выполняет прямой SQL-запрос</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.odbc-exec-description">
  <h3 class="title">Описание</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">
   Функция отправляет SQL-запрос на сервер базы данных.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.odbc-exec-parameters">
  <h3 class="title">Список параметров</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">odbc</code></dt>
     <dd>
      <p class="para">Объект ODBC-соединения.
Подробнее о коннекторе рассказывает описание функции <span class="function"><a href="function.odbc-connect.php" class="function">odbc_connect()</a></span>.</p>
     </dd>
    
    
     <dt><code class="parameter">query</code></dt>
     <dd>
      <p class="para">
       SQL-запрос.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.odbc-exec-returnvalues">
  <h3 class="title">Возвращаемые значения</h3>
  <p class="para">
   Функция возвращает объект ODBC с результатом, если SQL-команда выполнилась
   успешно, или <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>, если возникла ошибки.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.odbc-exec-changelog">
  <h3 class="title">Список изменений</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Версия</th>
      <th>Описание</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
 <td>8.4.0</td>
 <td>
  Параметр <code class="parameter">odbc</code> теперь принимает объект соединения <span class="classname"><strong class="classname">Odbc\Connection</strong></span>;
  раньше принимался тип <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span>.
 </td>
</tr>

     <tr>
 <td>8.4.0</td>
 <td>
  Функция теперь возвращает объект с результатом ODBC-запроса <span class="classname"><strong class="classname">Odbc\Result</strong></span>;
  раньше возвращалось значение с типом <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span>.
 </td>
</tr>

     <tr>
      <td>8.0.0</td>
      <td>
       Параметр <code class="parameter">flags</code> удалили.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 seealso" id="refsect1-function.odbc-exec-seealso">
  <h3 class="title">Смотрите также</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> - Подготавливает запрос к выполнению</span></li>
    <li><span class="function"><a href="function.odbc-execute.php" class="function" rel="rdfs-seeAlso">odbc_execute()</a> - Выполняет запрос</span></li>
   </ul>
  </p>
 </div>


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