mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
removed dead sesam docs
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@255534 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
c2f008bf39
commit
ce5d09156a
4 changed files with 0 additions and 575 deletions
|
@ -1,169 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<refentry xml:id="function.sesam-query" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>sesam_query</refname>
|
||||
<refpurpose>Perform a SESAM SQL query and prepare the result</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>sesam_query</methodname>
|
||||
<methodparam><type>string</type><parameter>query</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>scrollable</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>sesam_query</function> sends a query to the currently
|
||||
active database on the server. It can execute both "immediate"
|
||||
SQL statements and "select type" queries. If an "immediate"
|
||||
statement is executed, then no cursor is allocated, and any
|
||||
subsequent <function>sesam_fetch_row</function> or
|
||||
<function>sesam_fetch_result</function> call will return an empty
|
||||
result (zero columns, indicating end-of-result).
|
||||
</para>
|
||||
<para>
|
||||
When using "scrollable" cursors, the cursor can be freely
|
||||
positioned on the result set. For each "scrollable" query, there
|
||||
are global default values for the scrolling type (initialized to:
|
||||
<literal>SESAM_SEEK_NEXT</literal>) and the scrolling offset
|
||||
which can either be set once by
|
||||
<function>sesam_seek_row</function> or each time when fetching a
|
||||
row using <function>sesam_fetch_row</function>.
|
||||
</para>
|
||||
<para>
|
||||
For "immediate" statements, the number of affected rows is saved
|
||||
for retrieval by the <function>sesam_affected_rows</function>
|
||||
function.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>query</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The query statement.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>scrollable</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
For "select type" statements, a result descriptor and a (scrollable or
|
||||
sequential, depending on the optional boolean
|
||||
<parameter>scrollable</parameter> parameter) cursor will be allocated.
|
||||
If <parameter>scrollable</parameter> is omitted, the cursor will be
|
||||
sequential.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns a SESAM "result identifier" on success, or &false; on error. This
|
||||
result id is used by the other functions.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>
|
||||
Show all rows of the "phone" table as a HTML table
|
||||
</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
if (!sesam_connect("phonedb", "demo", "otto"))
|
||||
die("cannot connect");
|
||||
$result = sesam_query("select * from phone");
|
||||
if (!$result) {
|
||||
$err = sesam_diagnostic();
|
||||
die ($err["errmsg"]);
|
||||
}
|
||||
echo "<table border>\n";
|
||||
// Add title header with column names above the result:
|
||||
if ($cols = sesam_field_array($result)) {
|
||||
echo "<tr><th colspan=" . $cols["count"] . ">Result:</th></tr>\n";
|
||||
echo "<tr>\n";
|
||||
for ($col = 0; $col < $cols["count"]; ++$col) {
|
||||
$colattr = $cols[$col];
|
||||
/* Span the table head over SESAM's "Multiple Fields": */
|
||||
if ($colattr["count"] > 1) {
|
||||
echo "<th colspan=\"" . $colattr["count"] . "\">" . $colattr["name"] .
|
||||
"(1.." . $colattr["count"] . ")</th>\n";
|
||||
$col += $colattr["count"] - 1;
|
||||
} else
|
||||
echo "<th>" . $colattr["name"] . "</th>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
do {
|
||||
// Fetch the result in chunks of 100 rows max.
|
||||
$ok = sesam_fetch_result($result, 100);
|
||||
for ($row=0; $row < $ok["rows"]; ++$row) {
|
||||
echo " <tr>\n";
|
||||
for ($col = 0; $col < $ok["cols"]; ++$col) {
|
||||
if (isset($ok[$col][$row])) {
|
||||
echo "<td>" . $ok[$col][$row] . "</td>\n";
|
||||
} else {
|
||||
echo "<td>-empty-</td>\n";
|
||||
}
|
||||
}
|
||||
echo "</tr>\n";
|
||||
}
|
||||
} while ($ok["truncated"]); // while there may be more data
|
||||
|
||||
echo "</table>\n";
|
||||
// free result id
|
||||
sesam_free_result($result);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>sesam_fetch_row</function></member>
|
||||
<member><function>sesam_fetch_result</function></member>
|
||||
</simplelist>
|
||||
</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
|
||||
-->
|
|
@ -1,88 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<refentry xml:id="function.sesam-rollback" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>sesam_rollback</refname>
|
||||
<refpurpose>Discard any pending updates to the SESAM database</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>sesam_rollback</methodname>
|
||||
<void/>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>sesam_rollback</function> discards any pending updates
|
||||
to the database. Also affected are result cursors and result
|
||||
descriptors.
|
||||
</para>
|
||||
<para>
|
||||
At the end of each script, and as part of the
|
||||
<function>sesam_disconnect</function> function, an implied
|
||||
<function>sesam_rollback</function> is executed, discarding any
|
||||
pending changes to the database.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Discarding an update to the SESAM database</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
if (sesam_connect ("mycatalog", "myschema", "otto")) {
|
||||
if (sesam_execimm ("INSERT INTO mytable VALUES (*, 'Small Test', <0, 8, 15>)")
|
||||
&& sesam_execimm ("INSERT INTO othertable VALUES (*, 'Another Test', 1)")) {
|
||||
sesam_commit();
|
||||
} else {
|
||||
sesam_rollback();
|
||||
}
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>sesam_commit</function></member>
|
||||
</simplelist>
|
||||
</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
|
||||
-->
|
|
@ -1,151 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<refentry xml:id="function.sesam-seek-row" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>sesam_seek_row</refname>
|
||||
<refpurpose>Set scrollable cursor mode for subsequent fetches</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>sesam_seek_row</methodname>
|
||||
<methodparam><type>string</type><parameter>result_id</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>whence</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>offset</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Sets the scrollable cursor mode for subsequent fetches.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>result_id</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
<parameter>result_id</parameter> is a valid result id (select
|
||||
type queries only, and only if a "scrollable" cursor was
|
||||
requested when calling <function>sesam_query</function>).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>whence</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
<parameter>whence</parameter> sets the global default value for the
|
||||
scrolling type, it specifies the scroll type to use in subsequent
|
||||
fetch operations on "scrollable" cursors, which can be set to the
|
||||
following predefined constants:
|
||||
<table>
|
||||
<title>Valid values for <parameter>whence</parameter></title>
|
||||
<tgroup cols="3">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>Value</entry>
|
||||
<entry>Constant</entry>
|
||||
<entry>Meaning</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>0</entry>
|
||||
<entry><constant>SESAM_SEEK_NEXT</constant></entry>
|
||||
<entry>read sequentially
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>1</entry>
|
||||
<entry><constant>SESAM_SEEK_PRIOR</constant></entry>
|
||||
<entry>read sequentially backwards
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>2</entry>
|
||||
<entry><constant>SESAM_SEEK_FIRST</constant></entry>
|
||||
<entry>
|
||||
fetch first row (after fetch, the default is set to
|
||||
<constant>SESAM_SEEK_NEXT</constant>)
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>3</entry>
|
||||
<entry><constant>SESAM_SEEK_LAST</constant></entry>
|
||||
<entry>
|
||||
fetch last row (after fetch, the default is set to
|
||||
<constant>SESAM_SEEK_PRIOR</constant>)
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>4</entry>
|
||||
<entry><constant>SESAM_SEEK_ABSOLUTE</constant></entry>
|
||||
<entry>
|
||||
fetch absolute row number given as
|
||||
<parameter>offset</parameter> (Zero-based. After fetch, the
|
||||
default is set to <constant>SESAM_SEEK_ABSOLUTE</constant>,
|
||||
and the offset value is auto-incremented)
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>5</entry>
|
||||
<entry><constant>SESAM_SEEK_RELATIVE</constant></entry>
|
||||
<entry>
|
||||
fetch relative to current scroll position, where
|
||||
<parameter>offset</parameter> can be a positive or negative
|
||||
offset value (this also sets the default "offset" value for
|
||||
subsequent fetches).
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>offset</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
An optional parameter which is only evaluated (and required) if
|
||||
<parameter>whence</parameter> is either
|
||||
<constant>SESAM_SEEK_RELATIVE</constant> or
|
||||
<constant>SESAM_SEEK_ABSOLUTE</constant>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</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
|
||||
-->
|
|
@ -1,167 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<refentry xml:id="function.sesam-settransaction" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>sesam_settransaction</refname>
|
||||
<refpurpose>Set SESAM transaction parameters</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>sesam_settransaction</methodname>
|
||||
<methodparam><type>int</type><parameter>isolation_level</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>read_only</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Overrides the default values for the <literal>isolation level</literal>
|
||||
and <literal>read-only</literal> transaction parameters (which are set in
|
||||
the SESAM configuration file), in order to optimize subsequent queries and
|
||||
guarantee database consistency. The overridden values are used for the
|
||||
next transaction only. See the SESAM handbook for detailed explanation of
|
||||
the semantics.
|
||||
</para>
|
||||
<para>
|
||||
This function can only be called before starting a transaction, not after
|
||||
the transaction has been started already.
|
||||
</para>
|
||||
<para>
|
||||
The values set by <function>sesam_settransaction</function> will override
|
||||
the default setting specified in the <link
|
||||
linkend="ini.sesam-configfile">SESAM configuration file</link>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>isolation_level</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
<table>
|
||||
<title>
|
||||
Valid values for <parameter>isolation_level</parameter>
|
||||
parameter
|
||||
</title>
|
||||
<tgroup cols="3">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>Value</entry>
|
||||
<entry>Constant</entry>
|
||||
<entry>Meaning</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>1</entry>
|
||||
<entry><literal>SESAM_TXISOL_READ_UNCOMMITTED</literal></entry>
|
||||
<entry>Read Uncommitted</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>2</entry>
|
||||
<entry><literal>SESAM_TXISOL_READ_COMMITTED</literal></entry>
|
||||
<entry>Read Committed</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>3</entry>
|
||||
<entry><literal>SESAM_TXISOL_REPEATABLE_READ</literal></entry>
|
||||
<entry>Repeatable Read</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>4</entry>
|
||||
<entry><literal>SESAM_TXISOL_SERIALIZABLE</literal></entry>
|
||||
<entry>Serializable</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>read_only</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
<table>
|
||||
<title>
|
||||
Valid values for <parameter>read_only</parameter> parameter
|
||||
</title>
|
||||
<tgroup cols="3">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>Value</entry>
|
||||
<entry>Constant</entry>
|
||||
<entry>Meaning</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>0</entry>
|
||||
<entry><literal>SESAM_TXREAD_READWRITE</literal></entry>
|
||||
<entry>Read/Write</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>1</entry>
|
||||
<entry><literal>SESAM_TXREAD_READONLY</literal></entry>
|
||||
<entry>Read-Only</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns &true; if the values are valid, and the
|
||||
<literal>settransaction</literal> operation was successful, &false;
|
||||
otherwise.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Setting SESAM transaction parameters</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
sesam_settransaction (SESAM_TXISOL_REPEATABLE_READ,
|
||||
SESAM_TXREAD_READONLY);
|
||||
?>
|
||||
]]>
|
||||
</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
|
||||
-->
|
Loading…
Reference in a new issue