mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-29 23:38:56 +00:00

- All id attributes are now xml:id - Add docbook namespace to all root elements - Replace <ulink /> with <link xlink:href /> - Minor markup fixes here and there git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@238160 c90b9560-bf6c-de11-be94-00142212c4b1
110 lines
2.7 KiB
XML
110 lines
2.7 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.7 $ -->
|
|
<refentry xml:id="function.ovrimos-prepare" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>ovrimos_prepare</refname>
|
|
<refpurpose>Prepares an SQL statement</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>int</type><methodname>ovrimos_prepare</methodname>
|
|
<methodparam><type>int</type><parameter>connection_id</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>query</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Prepares an SQL statement.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>connection_id</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
The Ovrimos connection identifier, returned by
|
|
<function>ovrimos_connect</function>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>query</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
The SQL statement.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Returns a result identifier on success, or &false; on error.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title><function>ovrimos_prepare</function> Example</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$conn=ovrimos_connect("db_host", "8001", "admin", "password");
|
|
if ($conn!=0) {
|
|
echo "Connection ok!";
|
|
|
|
// Prepare the statement
|
|
$res=ovrimos_prepare($conn, "select table_id, table_name
|
|
from sys.tables where table_id=1");
|
|
if ($res != 0) {
|
|
echo "Prepare ok!";
|
|
// Execute the prepared statement
|
|
if (ovrimos_execute($res)) {
|
|
echo "Execute ok!\n";
|
|
ovrimos_result_all($res);
|
|
} else {
|
|
echo "Execute not ok!";
|
|
}
|
|
ovrimos_free_result($res);
|
|
} else {
|
|
echo "Prepare not ok!\n";
|
|
}
|
|
ovrimos_close($conn);
|
|
}
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|