Some cosmetic changes.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@33963 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Egon Schmid 2000-10-17 12:33:25 +00:00
parent c74d04f95b
commit 33830d320f

View file

@ -4,31 +4,34 @@
<partintro>
<para>
Ovrimos SQL Server, is a client/server, transactional RDBMS combined with Web
capabilities and fast transactions.
Ovrimos SQL Server, is a client/server, transactional RDBMS
combined with Web capabilities and fast transactions.
</para>
<para>
Ovrimos SQL Server is available at <ulink url="&url.ovrimos;">www.ovrimos.com</ulink>.
To enable ovrimos support in PHP just compile php with the '--with-ovrimos' parameter
to configure script. You'll need to install the sqlcli library available in the Ovrimos SQL Server
distribution.
Ovrimos SQL Server is available at <ulink
url="&url.ovrimos;">www.ovrimos.com</ulink>. To enable ovrimos
support in PHP just compile php with the '--with-ovrimos'
parameter to configure script. You'll need to install the sqlcli
library available in the Ovrimos SQL Server distribution.
</para>
<para>
<example>
<title>Connect to Ovrimos SQL Server and select from a system table</title>
<title>
Connect to Ovrimos SQL Server and select from a system table
</title>
<programlisting role="php">
&lt;?php
$conn = ovrimos_connect("server.domain.com","8001","admin","password");
if($conn != 0) {
echo("Connection ok!");
$res=ovrimos_exec($conn,"select table_id,table_name from sys.tables");
if($res != 0) {
echo("Statement ok!");
ovrimos_result_all($res);
ovrimos_free_result($res);
}
ovrimos_close($conn);
$conn = ovrimos_connect ("server.domain.com", "8001", "admin", "password");
if ($conn != 0) {
echo ("Connection ok!");
$res = ovrimos_exec ($conn, "select table_id, table_name from sys.tables");
if ($res != 0) {
echo "Statement ok!";
ovrimos_result_all ($res);
ovrimos_free_result ($res);
}
ovrimos_close($conn);
}
?&gt;
</programlisting>
</example>
@ -36,7 +39,7 @@ if($conn != 0) {
</para>
</partintro>
<refentry id="function.ovrimos_connect">
<refentry id="function.ovrimos-connect">
<refnamediv>
<refname>ovrimos_connect</refname>
<refpurpose>Connect to the specified database</refpurpose>
@ -53,40 +56,42 @@ if($conn != 0) {
</funcprototype>
</funcsynopsis>
<para>
<function>ovrimos_connect</function> is used to connect to the specified
database.
<function>ovrimos_connect</function> is used to connect to the
specified database.
</para>
<para>
<function>ovrimos_connect</function>
Returns a connection id (greater than 0) or 0 for failure. The meaning of 'host' and 'port'
are those used everywhere in Ovrimos APIs. 'Host' is a host name or IP address
and 'db' is either a database name, or a string containing the port number.
<function>ovrimos_connect</function> returns a connection id
(greater than 0) or 0 for failure. The meaning of 'host' and
'port' are those used everywhere in Ovrimos APIs. 'Host' is a
host name or IP address and 'db' is either a database name, or a
string containing the port number.
</para>
<para>
<example>
<title><function>ovrimos_connect</function> Example</title>
<programlisting>
<programlisting role="php">
&lt;?php
$conn = ovrimos_connect("server.domain.com","8001","admin","password");
if($conn != 0) {
echo("Connection ok!");
$res=ovrimos_exec($conn,"select table_id,table_name from sys.tables");
if($res != 0) {
echo("Statement ok!");
ovrimos_result_all($res);
ovrimos_free_result($res);
}
ovrimos_close($conn);
$conn = ovrimos_connect ("server.domain.com", "8001", "admin", "password");
if ($conn != 0) {
echo "Connection ok!";
$res=ovrimos_exec ($conn, "select table_id, table_name from sys.tables");
if ($res != 0) {
echo "Statement ok!";
ovrimos_result_all ($res);
ovrimos_free_result ($res);
}
ovrimos_close ($conn);
}
?&gt;
</programlisting>
</example>
The above example will connect to the database and print out the specified table.
The above example will connect to the database and print out the
specified table.
</para>
</refsect1>
</refentry>
<refentry id="function.ovrimos_close">
<refentry id="function.ovrimos-close">
<refnamediv>
<refname>ovrimos_close</refname>
<refpurpose>Closes the connection to ovrimos</refpurpose>
@ -100,17 +105,18 @@ if($conn != 0) {
</funcprototype>
</funcsynopsis>
<para>
<function>ovrimos_close</function> is used to close the specified connection.
<function>ovrimos_close</function> is used to close the specified
connection.
</para>
<para>
<function>ovrimos_close</function>
Closes a connection to Ovrimos. This has the effect of rolling back uncommitted
transactions.
<function>ovrimos_close</function> closes a connection to
Ovrimos. This has the effect of rolling back uncommitted
transactions.
</para>
</refsect1>
</refsect1>
</refentry>
<refentry id="function.ovrimos_close_all">
<refentry id="function.ovrimos-close-all">
<refnamediv>
<refname>ovrimos_close_all</refname>
<refpurpose>Closes all the connections to ovrimos</refpurpose>
@ -124,20 +130,23 @@ if($conn != 0) {
</funcprototype>
</funcsynopsis>
<para>
<function>ovrimos_close_all</function> is used to close all the connections.
<function>ovrimos_close_all</function> is used to close all the
connections.
</para>
<para>
<function>ovrimos_close_all</function>
Closes all connections to Ovrimos. This has the effect of rolling back uncommitted
transactions.
<function>ovrimos_close_all</function> closes all connections to
Ovrimos. This has the effect of rolling back uncommitted
transactions.
</para>
</refsect1>
</refsect1>
</refentry>
<refentry id="function.ovrimos_longreadlen">
<refentry id="function.ovrimos-longreadlen">
<refnamediv>
<refname>ovrimos_longreadlen</refname>
<refpurpose>Specifies how many bytes are to be retrieved from long datatypes</refpurpose>
<refpurpose>
Specifies how many bytes are to be retrieved from long datatypes
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -149,19 +158,20 @@ if($conn != 0) {
</funcprototype>
</funcsynopsis>
<para>
<function>ovrimos_longreadlen</function> is used to specify how many bytes are to be retrieved from long datatypes.
<function>ovrimos_longreadlen</function> is used to specify how
many bytes are to be retrieved from long datatypes.
</para>
<para>
<function>ovrimos_longreadlen</function>
Specifies how many bytes are to be retrieved from long datatypes (long varchar
and long varbinary). Default is zero. Regardless of its taking a result_id as
an argument, it currently sets this parameter for all result sets. Returns true.
<function>ovrimos_longreadlen</function> specifies how many bytes
are to be retrieved from long datatypes (long varchar and long
varbinary). Default is zero. Regardless of its taking a result_id
as an argument, it currently sets this parameter for all result
sets. Returns true.
</para>
</refsect1>
</refsect1>
</refentry>
<refentry id="function.ovrimos_prepare">
<refentry id="function.ovrimos-prepare">
<refnamediv>
<refname>ovrimos_prepare</refname>
<refpurpose>Prepares an SQL statement</refpurpose>
@ -179,42 +189,43 @@ an argument, it currently sets this parameter for all result sets. Returns true.
<function>ovrimos_prepare</function> is used to prepare an SQL statement.
</para>
<para>
<function>ovrimos_prepare</function>
Prepares an SQL statement and returns a result_id (or false on failure).
<function>ovrimos_prepare</function> prepares an SQL statement
and returns a result_id (or false on failure).
</para>
<para>
<example>
<title>Connect to Ovrimos SQL Server and prepare a statement</title>
<programlisting role="php">
&lt;?php
$conn=ovrimos_connect("db_host","8001","admin","password");
if($conn!=0) {
echo("Connection ok!");
$res=ovrimos_prepare($conn,"select table_id,table_name from sys.tables where table_id=1");
if($res!=0) {
echo("Prepare ok!");
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);
$conn=ovrimos_connect ("db_host", "8001", "admin", "password");
if ($conn!=0) {
echo "Connection ok!";
$res=ovrimos_prepare ($conn, "select table_id, table_name
from sys.tables where table_id=1");
if ($res != 0) {
echo "Prepare ok!";
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);
}
?&gt;
</programlisting>
</example>
This will connect to Ovrimos SQL Server, prepare a statement and the execute it.
</para>
</refsect1>
</programlisting>
</example>
This will connect to Ovrimos SQL Server, prepare a statement and
the execute it.
</para>
</refsect1>
</refentry>
<refentry id="function.ovrimos_execute">
<refentry id="function.ovrimos-execute">
<refnamediv>
<refname>ovrimos_execute</refname>
<refpurpose>Executes a prepared SQL statement</refpurpose>
@ -225,24 +236,28 @@ if($conn!=0) {
<funcprototype>
<funcdef>int <function>ovrimos_execute</function></funcdef>
<paramdef>int <parameter>result_id</parameter></paramdef>
<paramdef>[ array <parameter> parameters_array]</parameter></paramdef>
<paramdef>array
<parameter><optional>parameters_array</optional></parameter>
</paramdef>
</funcprototype>
</funcsynopsis>
<para>
<function>ovrimos_execute</function> is used to execute an SQL statement.
<function>ovrimos_execute</function> is used to execute an SQL
statement.
</para>
<para>
<function>ovrimos_execute</function>
Executes a prepared statement. Returns true or false. If the prepared
statement contained parameters (question marks in the statement), the
correct number of parameters should be passed in an array. Notice that I don't
follow the PHP convention of placing just the name of the optional parameter
inside square brackets. I couldn't bring myself on liking it.
<function>ovrimos_execute</function> executes a prepared
statement. Returns true or false. If the prepared statement
contained parameters (question marks in the statement), the
correct number of parameters should be passed in an array. Notice
that I don't follow the PHP convention of placing just the name
of the optional parameter inside square brackets. I couldn't
bring myself on liking it.
</para>
</refsect1>
</refentry>
<refentry id="function.ovrimos_cursor">
<refentry id="function.ovrimos-cursor">
<refnamediv>
<refname>ovrimos_cursor</refname>
<refpurpose>Returns the name of the cursor</refpurpose>
@ -256,18 +271,18 @@ inside square brackets. I couldn't bring myself on liking it.
</funcprototype>
</funcsynopsis>
<para>
<function>ovrimos_cursor</function> is used to get the name of the cursor.
<function>ovrimos_cursor</function> is used to get the name of
the cursor.
</para>
<para>
<function>ovrimos_cursor</function>
Returns the name of the cursor. Useful when wishing to perform positioned
updates or deletes.
<function>ovrimos_cursor</function> returns the name of the
cursor. Useful when wishing to perform positioned updates or
deletes.
</para>
</refsect1>
</refentry>
<refentry id="function.ovrimos_exec">
<refentry id="function.ovrimos-exec">
<refnamediv>
<refname>ovrimos_exec</refname>
<refpurpose>Executes an SQL statement</refpurpose>
@ -282,17 +297,18 @@ updates or deletes.
</funcprototype>
</funcsynopsis>
<para>
<function>ovrimos_exec</function> is used to execute an SQL statement.
<function>ovrimos_exec</function> is used to execute an SQL
statement.
</para>
<para>
<function>ovrimos_exec</function>
Executes an SQL statement (query or update) and returns a result_id or false.
Evidently, the SQL statement should not contain parameters.
<function>ovrimos_exec</function> executes an SQL statement
(query or update) and returns a result_id or false. Evidently,
the SQL statement should not contain parameters.
</para>
</refsect1>
</refsect1>
</refentry>
<refentry id="function.ovrimos_fetch_into">
<refentry id="function.ovrimos-fetch-into">
<refnamediv>
<refname>ovrimos_fetch_into</refname>
<refpurpose>Fetches a row from the result set</refpurpose>
@ -304,63 +320,70 @@ Evidently, the SQL statement should not contain parameters.
<funcdef>int <function>ovrimos_fetch_into</function></funcdef>
<paramdef>int <parameter>result_id</parameter></paramdef>
<paramdef>array <parameter>result_array</parameter></paramdef>
<paramdef>[ string <parameter>how</parameter></paramdef>
<paramdef>[int <parameter> rownumber]]</parameter></paramdef>
<paramdef>string
<parameter><optional>how</optional></parameter>
</paramdef>
<paramdef>int
<parameter><optional>rownumber</optional></parameter>
</paramdef>
</funcprototype>
</funcsynopsis>
<para>
<function>ovrimos_fetch_into</function> is used to fetch a row from the result set.
<function>ovrimos_fetch_into</function> is used to fetch a row
from the result set.
</para>
<para>
<function>ovrimos_fetch_into</function>
Fetches a row from the result set into 'result_array', which should be passed
by reference. Which row is fetched is determined by the two last parameters.
'how' is one of 'Next' (default), 'Prev', 'First', 'Last', 'Absolute',
corresponding to forward direction from current position, backward direction
from current position, forward direction from the start, backward direction
from the end and absolute position from the start (essentially equivalent to
'first' but needs 'rownumber'). Case is not significant. 'Rownumber' is
optional except for absolute positioning. Returns true or false.
</para>
<para>
<example>
<title>A fetch into example</title>
<programlisting role="php">
<function>ovrimos_fetch_into</function> fetches a row from the
result set into 'result_array', which should be passed by
reference. Which row is fetched is determined by the two last
parameters. 'how' is one of 'Next' (default), 'Prev', 'First',
'Last', 'Absolute', corresponding to forward direction from
current position, backward direction from current position,
forward direction from the start, backward direction from the end
and absolute position from the start (essentially equivalent to
'first' but needs 'rownumber'). Case is not
significant. 'Rownumber' is optional except for absolute
positioning. Returns true or false.
</para>
<para>
<example>
<title>A fetch into example</title>
<programlisting role="php">
&lt;?php
$conn=ovrimos_connect("neptune","8001","admin","password");
if($conn!=0) {
echo("Connection ok!");
$res=ovrimos_exec($conn,"select table_id,table_name from sys.tables");
if($res!=0) {
echo("Statement ok!");
if(ovrimos_fetch_into($res,&$row)) {
list($table_id,$table_name)=$row;
echo("table_id=" . $table_id . ", table_name=" . $table_name . "\n");
if(ovrimos_fetch_into($res,&$row)) {
list($table_id,$table_name)=$row;
echo("table_id=" . $table_id . ", table_name=" . $table_name . "\n");
} else {
echo("Next: error\n");
}
} else {
echo("First: error\n");
}
ovrimos_free_result($res);
}
ovrimos_close($conn);
$conn=ovrimos_connect ("neptune", "8001", "admin", "password");
if ($conn!=0) {
echo "Connection ok!";
$res=ovrimos_exec ($conn,"select table_id, table_name from sys.tables");
if ($res != 0) {
echo "Statement ok!";
if (ovrimos_fetch_into ($res, &$row)) {
list ($table_id, $table_name) = $row;
echo "table_id=".$table_id.", table_name=".$table_name."\n";
if (ovrimos_fetch_into ($res, &$row)) {
list ($table_id, $table_name) = $row;
echo "table_id=".$table_id.", table_name=".$table_name."\n";
} else {
echo "Next: error\n";
}
} else {
echo "First: error\n";
}
ovrimos_free_result ($res);
}
ovrimos_close ($conn);
}
?&gt;
</programlisting>
</example>
This example will fetch a row.
</programlisting>
</example>
This example will fetch a row.
</para>
</refsect1>
</refsect1>
</refentry>
<refentry id="function.ovrimos_fetch_row">
<refentry id="function.ovrimos-fetch-row">
<refnamediv>
<refname>ovrimos_fetch_row</refname>
<refpurpose>Fetches a row from the result set.</refpurpose>
<refpurpose>Fetches a row from the result set</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -368,56 +391,61 @@ if($conn!=0) {
<funcprototype>
<funcdef>int <function>ovrimos_fetch_row</function></funcdef>
<paramdef>int <parameter>result_id</parameter></paramdef>
<paramdef>[int <parameter>int how </parameter></paramdef>
<paramdef>[int <parameter> int row_number]]</parameter></paramdef>
<paramdef>int
<parameter><optional>how</optional></parameter>
</paramdef>
<paramdef>int
<parameter><optional>row_number</optional></parameter>
</paramdef>
</funcprototype>
</funcsynopsis>
<para>
<function>ovrimos_fetch_row</function> is used to fetch a row from the result set.
<function>ovrimos_fetch_row</function> is used to fetch a row
from the result set.
</para>
<para>
<function>ovrimos_fetch_row</function>
Fetches a row from the result set. Column values should be retrieved with
other calls. Returns true or false.
<function>ovrimos_fetch_row</function> fetches a row from the
result set. Column values should be retrieved with other
calls. Returns true or false.
</para>
<para>
<example>
<title>A fetch row example</title>
<programlisting role="php">
<para>
<example>
<title>A fetch row example</title>
<programlisting role="php">
&lt;?php
$conn=ovrimos_connect("remote.host","8001","admin","password");
if($conn!=0) {
echo("Connection ok!");
$res=ovrimos_exec($conn,"select table_id,table_name from sys.tables");
if($res!=0) {
echo("Statement ok!");
if(ovrimos_fetch_row($res,"First")) {
$table_id=ovrimos_result($res,1);
$table_name=ovrimos_result($res,2);
echo("table_id=" . $table_id . ", table_name=" . $table_name . "\n");
if(ovrimos_fetch_row($res,"Next")) {
$table_id=ovrimos_result($res,"table_id");
$table_name=ovrimos_result($res,"table_name");
echo("table_id=" . $table_id . ", table_name=" . $table_name . "\n");
} else {
echo("Next: error\n");
}
} else {
echo("First: error\n");
}
ovrimos_free_result($res);
}
ovrimos_close($conn);
$conn = ovrimos_connect ("remote.host", "8001", "admin", "password");
if ($conn != 0) {
echo "Connection ok!";
$res=ovrimos_exec ($conn, "select table_id, table_name from sys.tables");
if ($res != 0) {
echo "Statement ok!";
if (ovrimos_fetch_row ($res, "First")) {
$table_id = ovrimos_result ($res, 1);
$table_name = ovrimos_result ($res, 2);
echo "table_id=".$table_id.", table_name=".$table_name."\n";
if (ovrimos_fetch_row ($res, "Next")) {
$table_id = ovrimos_result ($res, "table_id");
$table_name = ovrimos_result ($res, "table_name");
echo "table_id=".$table_id.", table_name=".$table_name."\n";
} else {
echo "Next: error\n";
}
} else {
echo "First: error\n";
}
ovrimos_free_result ($res);
}
ovrimos_close ($conn);
}
?&gt;
</programlisting>
</example>
This will fetch a row and print the result.
</programlisting>
</example>
This will fetch a row and print the result.
</para>
</refsect1>
</refsect1>
</refentry>
<refentry id="function.ovrimos_result">
<refentry id="function.ovrimos-result">
<refnamediv>
<refname>ovrimos_result</refname>
<refpurpose>Retrieves the output column</refpurpose>
@ -432,20 +460,22 @@ if($conn!=0) {
</funcprototype>
</funcsynopsis>
<para>
<function>ovrimos_result</function> is used to retrieve the output column.
<function>ovrimos_result</function> is used to retrieve the
output column.
</para>
<para>
<function>ovrimos_result</function>
Retrieves the output column specified by 'field', either as a string or
as an 1-based index.
<function>ovrimos_result</function> retrieves the output column
specified by 'field', either as a string or as an 1-based index.
</para>
</refsect1>
</refentry>
<refentry id="function.ovrimos_result_all">
<refentry id="function.ovrimos-result-all">
<refnamediv>
<refname>ovrimos_result_all</refname>
<refpurpose>Prints the whole result set as an HTML table</refpurpose>
<refpurpose>
Prints the whole result set as an HTML table
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -453,102 +483,107 @@ as an 1-based index.
<funcprototype>
<funcdef>int <function>ovrimos_result_all</function></funcdef>
<paramdef>int <parameter>result_id</parameter></paramdef>
<paramdef>[string <parameter>format]</parameter></paramdef>
<paramdef>string
<parameter><optional>format</optional></parameter>
</paramdef>
</funcprototype>
</funcsynopsis>
<para>
<function>ovrimos_result_all</function> is used to print an HTML table containing the whole result set.
<function>ovrimos_result_all</function> is used to print an HTML
table containing the whole result set.
</para>
<para>
<function>ovrimos_result_all</function>
Prints the whole result set as an HTML table. Returns true or false.
<function>ovrimos_result_all</function> prints the whole result
set as an HTML table. Returns true or false.
</para>
<para>
<example>
<title>Prepare a statement, execute, and view the result</title>
<programlisting role="php">
<para>
<example>
<title>Prepare a statement, execute, and view the result</title>
<programlisting role="php">
&lt;?php
$conn=ovrimos_connect("db_host","8001","admin","password");
if($conn!=0) {
echo("Connection ok!");
$res=ovrimos_prepare($conn,"select table_id,table_name from sys.tables where table_id=?");
if($res!=0) {
echo("Prepare ok!");
if(ovrimos_execute($res,array(3))) {
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);
$conn = ovrimos_connect ("db_host", "8001", "admin", "password");
if ($conn != 0) {
echo "Connection ok!";
$res = ovrimos_prepare ($conn, "select table_id, table_name
from sys.tables where table_id = 7");
if ($res != 0) {
echo "Prepare ok!";
if (ovrimos_execute ($res, array(3))) {
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);
}
?&gt;
</programlisting>
</example>
This will execute an SQL statement and print the result in an HTML table.
</para>
<para>
<example>
<title>ovrimos_result_all with meta-information</title>
<programlisting role="php">
</programlisting>
</example>
This will execute an SQL statement and print the result in an
HTML table.
</para>
<para>
<example>
<title>Ovrimos_result_all with meta-information</title>
<programlisting role="php">
&lt;?php
$conn=ovrimos_connect("db_host","8001","admin","password");
if($conn!=0) {
echo("Connection ok!");
$res=ovrimos_exec($conn,"select table_id,table_name from sys.tables where tabl
if($res!=0) {
echo("Statement ok! cursor=" . ovrimos_cursor($res) . "\n");
$colnb=ovrimos_num_fields($res);
echo("Output columns=" . $colnb . "\n");
for($i=1; $i<=$colnb; $i++) {
$name=ovrimos_field_name($res,$i);
$type=ovrimos_field_type($res,$i);
$len=ovrimos_field_len($res,$i);
echo("Column " . $i . " name=" . $name . " type=" . $type . " len=". $len .
}
ovrimos_result_all($res);
ovrimos_free_result($res);
}
ovrimos_close($conn);
$conn = ovrimos_connect ("db_host", "8001", "admin", "password");
if ($conn != 0) {
echo "Connection ok!";
$res = ovrimos_exec ($conn, "select table_id, table_name
from sys.tables where table_id = 1")
if ($res != 0) {
echo "Statement ok! cursor=".ovrimos_cursor ($res)."\n";
$colnb = ovrimos_num_fields ($res);
echo "Output columns=".$colnb."\n";
for ($i=1; $i<=$colnb; $i++) {
$name = ovrimos_field_name ($res, $i);
$type = ovrimos_field_type ($res, $i);
$len = ovrimos_field_len ($res, $i);
echo "Column ".$i." name=".$name." type=".$type." len=".$len."\n";
}
ovrimos_result_all ($res);
ovrimos_free_result ($res);
}
ovrimos_close ($conn);
}
?&gt;
</programlisting>
</example>
</para>
<para>
<example>
<title>ovrimos_result_all example</title>
<programlisting role="php">
</programlisting>
</example>
</para>
<para>
<example>
<title>ovrimos_result_all example</title>
<programlisting role="php">
&lt;?php
$conn=ovrimos_connect("db_host","8001","admin","password");
if($conn!=0) {
echo("Connection ok!");
$res=ovrimos_exec($conn,"update test set i=5");
if($res!=0) {
echo("Statement ok!");
echo(ovrimos_num_rows($res) . " rows affected\n");
ovrimos_free_result($res);
}
ovrimos_close($conn);
$conn = ovrimos_connect ("db_host", "8001", "admin", "password");
if ($conn != 0) {
echo "Connection ok!";
$res = ovrimos_exec ($conn, "update test set i=5");
if ($res != 0) {
echo "Statement ok!";
echo ovrimos_num_rows ($res)." rows affected\n";
ovrimos_free_result ($res);
}
ovrimos_close ($conn);
}
?&gt;
</programlisting>
</example>
</para>
</refsect1>
</programlisting>
</example>
</para>
</refsect1>
</refentry>
<refentry id="function.ovrimos_num_rows">
<refentry id="function.ovrimos-num-rows">
<refnamediv>
<refname>ovrimos_num_rows</refname>
<refpurpose>Returns the number of rows affected by update operations</refpurpose>
<refpurpose>
Returns the number of rows affected by update operations
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -559,16 +594,17 @@ if($conn!=0) {
</funcprototype>
</funcsynopsis>
<para>
<function>ovrimos_num_rows</function> is used to get the number of rows affected by update operations.
<function>ovrimos_num_rows</function> is used to get the number
of rows affected by update operations.
</para>
<para>
<function>ovrimos_num_rows</function>
Returns the number of rows affected by update operations.
<function>ovrimos_num_rows</function> returns the number of rows
affected by update operations.
</para>
</refsect1>
</refsect1>
</refentry>
<refentry id="function.ovrimos_num_fields">
<refentry id="function.ovrimos-num-fields">
<refnamediv>
<refname>ovrimos_num_fields</refname>
<refpurpose>Returns the number of columns</refpurpose>
@ -582,16 +618,17 @@ Returns the number of rows affected by update operations.
</funcprototype>
</funcsynopsis>
<para>
<function>ovrimos_num_fields</function> is used to get the number of columns.
<function>ovrimos_num_fields</function> is used to get the number
of columns.
</para>
<para>
<function>ovrimos_num_fields</function>
Returns the number of columns in a result_id resulting from a query.
<function>ovrimos_num_fields</function> returns the number of
columns in a result_id resulting from a query.
</para>
</refsect1>
</refsect1>
</refentry>
<refentry id="function.ovrimos_field_name">
<refentry id="function.ovrimos-field-name">
<refnamediv>
<refname>ovrimos_field_name</refname>
<refpurpose>Returns the output column name</refpurpose>
@ -606,19 +643,22 @@ Returns the number of columns in a result_id resulting from a query.
</funcprototype>
</funcsynopsis>
<para>
<function>ovrimos_field_name</function> is used to get the output column name.
<function>ovrimos_field_name</function> is used to get the output
column name.
</para>
<para>
<function>ovrimos_field_name</function>
Returns the output column name at the (1-based) index specified.
<function>ovrimos_field_name</function> returns the output column
name at the (1-based) index specified.
</para>
</refsect1>
</refsect1>
</refentry>
<refentry id="function.ovrimos_field_type">
<refentry id="function.ovrimos-field-type">
<refnamediv>
<refname>ovrimos_field_type</refname>
<refpurpose>Returns the (numeric) type of the output column</refpurpose>
<refpurpose>
Returns the (numeric) type of the output column
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -630,17 +670,17 @@ Returns the output column name at the (1-based) index specified.
</funcprototype>
</funcsynopsis>
<para>
<function>ovrimos_field_type</function> is used to get the (numeric) type of the output column.
<function>ovrimos_field_type</function> is used to get the
(numeric) type of the output column.
</para>
<para>
<function>ovrimos_field_type</function>
Returns the (numeric) type of the output column at the (1-based) index
specified.
<function>ovrimos_field_type</function> returns the (numeric)
type of the output column at the (1-based) index specified.
</para>
</refsect1>
</refentry>
<refentry id="function.ovrimos_field_len">
<refentry id="function.ovrimos-field-len">
<refnamediv>
<refname>ovrimos_field_len</refname>
<refpurpose>Returns the length of the output column</refpurpose>
@ -655,19 +695,22 @@ specified.
</funcprototype>
</funcsynopsis>
<para>
<function>ovrimos_field_len</function> is used to get the length of the output column.
<function>ovrimos_field_len</function> is used to get the length
of the output column.
</para>
<para>
<function>ovrimos_field_len</function>
Returns the length of the output column at the (1-based) index specified.
<function>ovrimos_field_len</function> returns the length of the
output column at the (1-based) index specified.
</para>
</refsect1>
</refentry>
<refentry id="function.ovrimos_field_num">
<refentry id="function.ovrimos-field-num">
<refnamediv>
<refname>ovrimos_field_num</refname>
<refpurpose>Returns the (1-based) index of the output column</refpurpose>
<refpurpose>
Returns the (1-based) index of the output column
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -679,16 +722,17 @@ Returns the length of the output column at the (1-based) index specified.
</funcprototype>
</funcsynopsis>
<para>
<function>ovrimos_field_num</function> is used to get the (1-based) index of the output column.
<function>ovrimos_field_num</function> is used to get the
(1-based) index of the output column.
</para>
<para>
<function>ovrimos_field_num</function>
Returns the (1-based) index of the output column specified by name, or false.
<function>ovrimos_field_num</function> returns the (1-based)
index of the output column specified by name, or false.
</para>
</refsect1>
</refsect1>
</refentry>
<refentry id="function.ovrimos_free_result">
<refentry id="function.ovrimos-free-result">
<refnamediv>
<refname>ovrimos_free_result</refname>
<refpurpose>Frees the specified result_id</refpurpose>
@ -702,16 +746,17 @@ Returns the (1-based) index of the output column specified by name, or false.
</funcprototype>
</funcsynopsis>
<para>
<function>ovrimos_free_result</function> is used to free the result_id.
<function>ovrimos_free_result</function> is used to free the
result_id.
</para>
<para>
<function>ovrimos_free_result</function>
Frees the specified result_id. Returns true.
<function>ovrimos_free_result</function> frees the specified
result_id. Returns true.
</para>
</refsect1>
</refentry>
<refentry id="function.ovrimos_commit">
<refentry id="function.ovrimos-commit">
<refnamediv>
<refname>ovrimos_commit</refname>
<refpurpose>Commits the transaction</refpurpose>
@ -725,16 +770,16 @@ Frees the specified result_id. Returns true.
</funcprototype>
</funcsynopsis>
<para>
<function>ovrimos_commit</function> is used to commit the transaction
<function>ovrimos_commit</function> is used to commit the
transaction.
</para>
<para>
<function>ovrimos_commit</function>
Commits the transaction.
<function>ovrimos_commit</function> commits the transaction.
</para>
</refsect1>
</refentry>
<refentry id="function.ovrimos_rollback">
<refentry id="function.ovrimos-rollback">
<refnamediv>
<refname>ovrimos_rollback</refname>
<refpurpose>Rolls back the transaction</refpurpose>
@ -748,16 +793,15 @@ Commits the transaction.
</funcprototype>
</funcsynopsis>
<para>
<function>ovrimos_rollback</function> is used to roll back the transaction
<function>ovrimos_rollback</function> is used to roll back the
transaction.
</para>
<para>
<function>ovrimos_rollback</function>
Rolls back the transaction.
<function>ovrimos_rollback</function> rolls back the transaction.
</para>
</refsect1>
</refentry>
</reference>
<!-- Keep this comment at the end of the file