cvs: phpdoc-es /reference/ifx/functions ifx-fetch-row.xml

From: Date: Thu, 04 Aug 2005 15:12:07 +0000
Subject: cvs: phpdoc-es /reference/ifx/functions ifx-fetch-row.xml
Groups: php.doc.es 
Request: Send a blank email to doc-es+get-1194@lists.php.net to get a copy of this message
javi Thu Aug 4 11:12:07 2005 EDT Modified files: /phpdoc-es/reference/ifx/functions ifx-fetch-row.xml Log: - Añadido EN-Revision - Actualizado el ejemplo http://cvs.php.net/diff.php/phpdoc-es/reference/ifx/functions/ifx-fetch-row.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-es/reference/ifx/functions/ifx-fetch-row.xml diff -u phpdoc-es/reference/ifx/functions/ifx-fetch-row.xml:1.1 phpdoc-es/reference/ifx/functions/ifx-fetch-row.xml:1.2 --- phpdoc-es/reference/ifx/functions/ifx-fetch-row.xml:1.1 Sun Apr 14 20:14:42 2002 +++ phpdoc-es/reference/ifx/functions/ifx-fetch-row.xml Thu Aug 4 11:12:06 2005 @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./es/functions/ifx.xml, last change in rev 1.1 --> -<!-- last change to 'ifx-fetch-row' in en/ tree in rev 1.2 --> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.5 Maintainer: javi Status: ready --> +<!-- splitted from ./en/functions/ifx.xml, last change in rev 1.2 --> <refentry id="function.ifx-fetch-row"> <refnamediv> <refname>ifx_fetch_row</refname> @@ -11,50 +12,57 @@ <methodsynopsis> <type>array</type><methodname>ifx_fetch_row</methodname> <methodparam><type>int</type><parameter>result_id</parameter></methodparam> - <methodparam choice="opt"><type>mixed</type><parameter>position - </parameter></methodparam> + <methodparam choice="opt"><type>mixed</type><parameter>position</parameter></methodparam> </methodsynopsis> <para> - Devuelve un array (vector) correspondiente a la fila le&iacute;da o &false; si no hay m&aacute;s + Devuelve un array (vector) correspondiente a la fila le&iacute;da o &false; si no hay m&aacute;s registros. - </para><para> + </para> + <para> Las columnas blob son devueltas como identificadores de blob enteros (integer) para usarlos con <function>ifx_get_blob</function> a menos que hayas usado ifx_textasvarchar(1) o ifx_byteasvarchar(1), en cuyo caso los blobs son devueltos como cadenas de texto. Devuelve &false; si hubo error. - </para><para> + </para> + <para> <parameter>result_id</parameter> es un identificador v&aacute;lido del resultado de <function>ifx_query</function> o <function>ifx_prepare</function> (s&oacute;lo para consultas de selecci&oacute;n). - </para><para> + </para> + <para> <parameter>position</parameter> es un par&aacute;metro opcional para una operaci&oacute;n de lectura sobre un cursor de tipo "scroll": "NEXT" (siguiente), "PREVIOUS" (anterior), "CURRENT" (actual), "FIRST" (primero), "LAST" (&uacute;ltimo) o un n&uacute;mero. Si se especifica un n&uacute;mero, un registro concreto es le&iacute;do. Este par&aacute;metro opcional es s&oacute;lo v&aacute;lido para cursores de tipo scroll. - </para><para> + </para> + <para> <function>ifx_fetch_row</function> lee el contenido de un registro de la consulta representada por el identificador de resultado indicado. La fila (registro) es devuelta en un array. Cada columna es guarda en un array, empezando &eacute;ste desde cero. - </para><para> + </para> + <para> Las llamadas posteriores a <function>ifx_fetch_row</function> devolver&aacute;n el registro siguiente en el resultado de la consulta, o &false; si no hay m&aacute;s filas. </para> + <para> <example> - <title>Leer registros</title> - <programlisting role="php3"> + <title>Leer registros de Informix</title> + <programlisting role="php"> +<![CDATA[ +<?php $rid = ifx_prepare ("select * from emp where name like " . $name, $connid, IFX_SCROLL); if (! $rid) { - ... error ... + /* ... error ... */ } $rowcount = ifx_affected_rows($rid); if ($rowcount > 1000) { - printf ("Too many rows in result set (%d)\n&lt;br>", $rowcount); // Demasiados registros en el resultado - die ("Please restrict your query&lt;br>\n"); // Por favor, restringe tu consulta + printf ("Demasiados registros en el resultado (%d)\n<br />", $rowcount); + die ("Por favor, restringe tu consulta<br />\n"); } if (! ifx_do ($rid)) { - ... error ... + /* ... error ... */ } $row = ifx_fetch_row ($rid, "NEXT"); while (is_array($row)) { @@ -62,12 +70,15 @@ $fieldvalue = $row[$fieldname]; printf ("%s = %s,", $fieldname, $fieldvalue); } - printf("\n&lt;br>"); + printf("\n<br />"); $row = ifx_fetch_row ($rid, "NEXT"); } ifx_free_result ($rid); - </programlisting> - </example> +?> +]]> + </programlisting> + </example> + </para> </refsect1> </refentry>

« previous php.doc.es (#1194) next »