CVS update: php3/doc/functions

From: Date: Sat, 06 Mar 1999 19:13:46 +0000
Subject: CVS update: php3/doc/functions
Groups: php.dev 
Request: Send a blank email to php-dev+get-4498@lists.php.net to get a copy of this message
Date: Saturday March 6, 1999 @ 14:13 Author: danny Update of /repository/php3/doc/functions In directory asf:/u/temp/cvs-serv11411/doc/functions Modified Files: ifx.sgml Log Message: - added function ifx_getsqlca() : gives access to sqlca.sqlerrd[0..5] allows you to retrieve the serial value after an insert. Returns a pseudo_row : $row["sqlerrd1"] is the serial value. - made all internal functions static. Index: php3/doc/functions/ifx.sgml diff -c php3/doc/functions/ifx.sgml:1.12 php3/doc/functions/ifx.sgml:1.13 *** php3/doc/functions/ifx.sgml:1.12 Sat Oct 31 14:22:42 1998 --- php3/doc/functions/ifx.sgml Sat Mar 6 14:13:46 1999 *************** *** 526,531 **** --- 526,574 ---- </refsect1> </refentry> + <refentry id="function.ifx-getsqlca"> + <refnamediv> + <refname>ifx_getsqlca</refname> + <refpurpose>Get the contents of sqlca.sqlerrd[0..5] after a query</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcdef>array <function>ifx_getsqlca</function></funcdef> + <paramdef>int <parameter>result_id</parameter></paramdef> + </funcsynopsis> + <para> + <parameter>result_id</parameter> is a valid result id returned by + <function>ifx_query</function> or + <function>ifx_prepare</function>. + </para><para> + Returns a pseudo-row (assiociative arry) with sqlca.sqlerrd[0] to sqlca.sqlerrd[5] + after the query associated with <parameter>result_id</parameter>. + </para><para> + For inserts, updates and deletes the values returned are those as set by the server + after executing the query. This gives access to the number of affected + rows and the serial insert value. For selects the values are those saved after + the prepare statement. This gives access to the estimated number of + affected rows. The use of this function saves the overhead of executing + a "select dbinfo('sqlca.sqlerrdx')" query, as it retrieves the values + that were saved by the ifx driver at the appropriate moment. + </para> + <example> + <title>Retrieve Informix sqlca.sqlerrd[x] values</title> + <programlisting role="php3"> + /* assume the first column of 'sometable' is a serial */ + $qid = ifx_query("insert into sometable values(0, '2nd column', 'another column' ", $connid); + if (! $qid) { + ... error ... + } + $sqlca = ifx_getsqlca ($qid); + $serial_value = $sqlca["sqlerrd1"]; + echo "The serial value of the inserted row is : " . $serial_value<br>\n"; + </programlisting> + </example> + </refsect1> + </refentry> + <refentry id="function.ifx-fetch-row"> <refnamediv> <refname>ifx_fetch_row</refname> -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#4498) next »