New functions added in PHP5

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@139459 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Ard Biesheuvel 2003-09-02 11:40:36 +00:00
parent bed6b181c5
commit 9ac597fb5a
9 changed files with 480 additions and 0 deletions

View file

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<refentry id="function.ibase-affected-rows">
<refnamediv>
<refname>ibase_affected_rows</refname>
<refpurpose>
Return the number of rows that were affected by the previous query
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>ibase_affected_rows</methodname>
<methodparam><type>resource</type><parameter>link_identifier</parameter></methodparam>
</methodsynopsis>
<para>
This function returns the number of rows that were affected by the previous query that was
executed from within the transaction context specified by <parameter>link_identifier</parameter>.
If <parameter>link_identifier</parameter> is a connection resource, its default transaction
is used.
</para>
<para>
See also
<function>ibase_query</function> and
<function>ibase_execute</function>.
</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
-->

View file

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<refentry id="function.ibase-drop-db">
<refnamediv>
<refname>ibase_drop_db</refname>
<refpurpose>
Drops a database
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>ibase_drop_db</methodname>
<methodparam><type>resource</type><parameter>connection</parameter></methodparam>
</methodsynopsis>
<para>
This functions drops a database that was opened by either <function>ibase_connect</function>
or <function>ibase_pconnect</function>. The database is closed and deleted from the server.
&return.success;
</para>
<para>
See also
<function>ibase_connect</function> and
<function>ibase_pconnect</function>.
</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
-->

View file

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<refentry id="function.ibase-errcode">
<refnamediv>
<refname>ibase_errcode</refname>
<refpurpose>
Return an error code
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>ibase_errcode</methodname>
<void/>
</methodsynopsis>
<para>
Returns the error code that resulted from the most recent InterBase function
call. Returns &false; if no error occurred.
</para>
<para>
See also
<function>ibase_errmsg</function>.
</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
-->

View file

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<refentry id="function.ibase-free-event-handler">
<refnamediv>
<refname>ibase_free_event_handler</refname>
<refpurpose>
Cancels a registered event handler
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>ibase_free_event_handler</methodname>
<methodparam><type>resource</type><parameter>event</parameter></methodparam>
</methodsynopsis>
<para>
This function causes the registered event handler specified by
<parameter>event</parameter> to be cancelled. The callback function
will no longer be called for the events it was registered to handle.
&return.success;
</para>
<para>
See also
<function>ibase_set_event_handler</function>.
</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
-->

View file

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<refentry id="function.ibase-name-result">
<refnamediv>
<refname>ibase_name_result</refname>
<refpurpose>
Assigns a name to a result set
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>ibase_name_result</methodname>
<methodparam><type>resource</type><parameter>result</parameter></methodparam>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
</methodsynopsis>
<para>
This function assigns a name to a result set. This name can be used later in
UPDATE|DELETE ... WHERE CURRENT OF <parameter>name</parameter> statements.
&return.success;
<informalexample>
<programlisting role="php">
<![CDATA[
<?php
$result = ibase_query( "SELECT field1,field2 FROM table FOR UPDATE" );
ibase_name_result($result,"my_cursor");
$updateqry = ibase_prepare("UPDATE table SET field2 = ? WHERE CURRENT OF my_cursor");
for ($i = 0; ibase_fetch_row($result); ++$i) {
ibase_execute($updateqry,$i);
}
?>
]]>
</programlisting>
</informalexample>
</para>
<para>
See also
<function>ibase_prepare</function> and
<function>ibase_execute</function>.
</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
-->

View file

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<refentry id="function.ibase-num-params">
<refnamediv>
<refname>ibase_num_params</refname>
<refpurpose>
Return the number of parameters in a prepared query
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>ibase_num_params</methodname>
<methodparam><type>resource</type><parameter>query</parameter></methodparam>
</methodsynopsis>
<para>
This function returns the number of parameters in the prepared query specified
by <parameter>query</parameter>. This is the number of binding arguments that
must be present when calling <function>ibase_execute</function>.
</para>
<para>
See also
<function>ibase_prepare</function> and
<function>ibase_param_info</function>.
</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
-->

View file

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<refentry id="function.ibase-param-info">
<refnamediv>
<refname>ibase_param_info</refname>
<refpurpose>
Return information about a parameter in a prepared query
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>array</type><methodname>ibase_param_info</methodname>
<methodparam><type>resource</type><parameter>query</parameter></methodparam>
<methodparam><type>int</type><parameter>param_number</parameter></methodparam>
</methodsynopsis>
<para>
Returns an array with information about a parameter after a
query has been prepared. The array contains the type and the length
of the parameter.
</para>
<para>
See also
<function>ibase_field_info</function> and
<function>ibase_num_params</function>.
</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
-->

View file

@ -0,0 +1,76 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<refentry id="function.ibase-set-event-handler">
<refnamediv>
<refname>ibase_set_event_handler</refname>
<refpurpose>
Register a callback function to be called when event are posted
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>resource</type><methodname>ibase_set_event_handler</methodname>
<methodparam choice="opt"><type>resource</type><parameter>connection</parameter></methodparam>
<methodparam><type>callback</type><parameter>event_handler</parameter></methodparam>
<methodparam><type>string</type><parameter>event_name1</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>event_name2</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>...</parameter></methodparam>
</methodsynopsis>
<para>
This function registers a PHP user function as event handler for the specified
events. The callback is called with the event name and the link resource as arguments
whenever one of the specified events is posted by the database. The callback must
return false if the event handler should be canceled. Any other return value is ignored.
<informalexample>
<programlisting role="php">
<![CDATA[
function event_handler($event_name, $link)
{
if ($event_name=="NEW ORDER") {
// process new order
ibase_query($link, "UPDATE orders SET status='handled'");
} else if ($event_name=="DB_SHUTDOWN") {
// free event handler
return false;
}
}
ibase_set_event_handler($link,"event_handler","NEW_ORDER","DB_SHUTDOWN");
]]>
</programlisting>
</informalexample>
</para>
<para>
The return value is an event resource. This resource can be used to free the event handler
using <function>ibase_free_event_handler</function>.
</para>
<para>
See also
<function>ibase_free_event_handler</function> and
<function>ibase_wait_event</function>.
</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
-->

View file

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<refentry id="function.ibase-wait-event">
<refnamediv>
<refname>ibase_wait_event</refname>
<refpurpose>
Wait for an event to be posted by the database
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>ibase_wait_event</methodname>
<methodparam choice="opt"><type>resource</type><parameter>connection</parameter></methodparam>
<methodparam><type>string</type><parameter>event_name1</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>event_name2</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>...</parameter></methodparam>
</methodsynopsis>
<para>
This functions suspends execution of the script until one of the specified events
is posted by the database. The name of the event that was posted is returned. This
function accepts up to 15 event arguments.
</para>
<para>
See also
<function>ibase_set_event_handler</function> and
<function>ibase_free_event_handler</function>.
</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
-->