downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Our source is open

The syntax highlighted source is automatically generated by PHP from the plaintext script. If you're interested in what's behind the several functions we used, you can always take a look at the source of the following files:

Of course, if you want to see the source of this page, we have it available. You can also browse the SVN repository for this website on svn.php.net.

Source of: /manual/en/function.ingres-prepare.php

<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once
dirname(__FILE__) ."/toc/ref.ingres.inc";
$setup = array (
 
'home' =>
  array (
   
0 => 'index.php',
   
1 => 'PHP Manual',
  ),
 
'head' =>
  array (
   
0 => 'UTF-8',
   
1 => 'en',
  ),
 
'this' =>
  array (
   
0 => 'function.ingres-prepare.php',
   
1 => 'ingres_prepare',
  ),
 
'up' =>
  array (
   
0 => 'ref.ingres.php',
   
1 => 'Ingres Functions',
  ),
 
'prev' =>
  array (
   
0 => 'function.ingres-pconnect.php',
   
1 => 'ingres_pconnect',
  ),
 
'next' =>
  array (
   
0 => 'function.ingres-query.php',
   
1 => 'ingres_query',
  ),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);

manual_header();
?>
<div id="function.ingres-prepare" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ingres_prepare</h1>
  <p class="verinfo">(PECL ingres &gt;= 1.1.0)</p><p class="refpurpose"><span class="refname">ingres_prepare</span> &mdash; <span class="dc-title">Prepare a query for later execution</span></p>

 </div>
 
 <a name="function.ingres-prepare.description"></a><div class="refsect1 description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type"><a href="language.pseudo-types.php#language.types.mixed" class="type mixed">mixed</a></span> <span class="methodname"><b>ingres_prepare</b></span>
    ( <span class="methodparam"><span class="type">resource</span> <tt class="parameter">$link</tt></span>
   , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$query</tt></span>
   )</div>

  <p class="para rdfs-comment">
   Prepares a query for execution by <a href="function.ingres-execute.php" class="function">ingres_execute()</a>.
  </p>
  <p class="para">
   The query becomes part of the currently open transaction.  If
   there is no open transaction, <a href="function.ingres-query.php" class="function">ingres_query()</a>
   opens a new transaction. To close the transaction, you can
   call either <a href="function.ingres-commit.php" class="function">ingres_commit()</a> to commit the changes
   made to the database or <a href="function.ingres-rollback.php" class="function">ingres_rollback()</a> to
   cancel these changes. When the script ends, any open transaction
   is rolled back (by calling
   <a href="function.ingres-rollback.php" class="function">ingres_rollback()</a>). You can also use
   <a href="function.ingres-autocommit.php" class="function">ingres_autocommit()</a> before opening a new
   transaction to have every SQL query immediately committed.
  </p>

  <blockquote><p><b class="note">Note</b>:
   <b>Related Configurations</b><br />
  
    See also the <a href="ingres.configuration.php#ini.ingres.describe" class="link">ingres.describe</a>,
    <a href="ingres.configuration.php#ini.ingres.scrollable" class="link">ingres.scrollable</a> and
    <a href="ingres.configuration.php#ini.ingres.utf8" class="link">ingres.utf8</a> directives in
    <a href="ingres.configuration.php" class="link">Runtime Configuration</a>.
   <br />
  </p></blockquote>
 </div>


 <a name="function.ingres-prepare.parameters"></a><div class="refsect1 parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   </p><dl>

    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">link</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       The connection link identifier
      </p>
     </dd>

   
    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">query</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       A valid SQL query (see the Ingres <i>SQL reference
       guide</i>) in the Ingres documentation.
       See the <a href="function.ingres-query.php#function.ingres-query.query" class="link">query</a>
       parameter in <a href="function.ingres-query.php" class="function">ingres_query()</a> for a list of SQL
       statements which cannot be executed using
       <b>ingres_prepare()</b>
      </p>
     </dd>

   
   </dl>
<p>
  </p>
 </div>


 <a name="function.ingres-prepare.returnvalues"></a><div class="refsect1 returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   <b>ingres_prepare()</b> returns a query result identifier that
   is used with <a href="function.ingres-execute.php" class="function">ingres_execute()</a> to execute the query. To see
   if an error occurred, use <a href="function.ingres-errno.php" class="function">ingres_errno()</a>,
   <a href="function.ingres-error.php" class="function">ingres_error()</a>, or
   <a href="function.ingres-errsqlstate.php" class="function">ingres_errsqlstate()</a>.
  </p>
 </div>




 <a name="function.ingres-prepare.seealso"></a><div class="refsect1 seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   </p><ul class="simplelist">
    <li class="member"><a href="function.ingres-unbuffered-query.php" class="function" rel="rdfs-seeAlso">ingres_unbuffered_query()</a> - Send an unbuffered  SQL query to Ingres</li>
    <li class="member"><a href="function.ingres-fetch-array.php" class="function" rel="rdfs-seeAlso">ingres_fetch_array()</a> - Fetch a row of result into an array</li>
    <li class="member"><a href="function.ingres-fetch-assoc.php" class="function" rel="rdfs-seeAlso">ingres_fetch_assoc()</a> - Fetch a row of result into an associative array</li>
    <li class="member"><a href="function.ingres-fetch-object.php" class="function" rel="rdfs-seeAlso">ingres_fetch_object()</a> - Fetch a row of result into an object</li>
    <li class="member"><a href="function.ingres-fetch-row.php" class="function" rel="rdfs-seeAlso">ingres_fetch_row()</a> - Fetch a row of result into an enumerated array</li>
    <li class="member"><a href="function.ingres-commit.php" class="function" rel="rdfs-seeAlso">ingres_commit()</a> - Commit a transaction</li>
    <li class="member"><a href="function.ingres-rollback.php" class="function" rel="rdfs-seeAlso">ingres_rollback()</a> - Roll back a transaction</li>
    <li class="member"><a href="function.ingres-autocommit.php" class="function" rel="rdfs-seeAlso">ingres_autocommit()</a> - Switch autocommit on or off</li>
    <li class="member"><a href="function.ingres-set-environment.php" class="function" rel="rdfs-seeAlso">ingres_set_environment()</a> - Set environment features controlling output options</li>
    <li class="member"><a href="function.ingres-errno.php" class="function" rel="rdfs-seeAlso">ingres_errno()</a> - Get the last Ingres error number generated</li>
    <li class="member"><a href="function.ingres-error.php" class="function" rel="rdfs-seeAlso">ingres_error()</a> - Get a meaningful error message for the last error generated</li>
   </ul><p>
  </p>
 </div>



</div><?php manual_footer(); ?>
 
show source | credits | sitemap | contact | advertising | mirror sites