cvs: phpdoc /en/reference/mysqli/mysqli/functions mysqli-affected-rows.xml mysqli-autocommit.xml mysqli-bind-param.xml mysqli-bind-result.xml
mysqli-change-user.xml mysqli-character-set-name.xml mysqli-client-encoding.xml mysqli-close.xml mysqli-commit.xml mysqli-connect-errno.xml
mysqli-connect-error.xml mysqli-connect.xml mysqli-data-seek.xml mysqli-debug.xml mysqli-disable-reads-from-master.xml mysqli-disable-rpl-parse.xml
mysqli-dump-debug-info.xml mysqli-embedded-connect.xml mysqli-enable-reads-from-master.xml mysqli-enable-rpl-parse.xml mysqli-errno.xml
mysqli-error.xml mysqli-escape-string.xml mysqli-execute.xml mysqli-fetch-array.xml mysqli-fetch-assoc.xml mysqli-fetch-field-direct.xml
mysqli-fetch-field.xml mysqli-fetch-fields.xml mysqli-fetch-lengths.xml mysqli-fetch.xml

From: Date: Tue, 16 Mar 2004 16:58:21 +0000
Subject: cvs: phpdoc /en/reference/mysqli/mysqli/functions mysqli-affected-rows.xml mysqli-autocommit.xml mysqli-bind-param.xml mysqli-bind-result.xml
mysqli-change-user.xml mysqli-character-set-name.xml mysqli-client-encoding.xml mysqli-close.xml mysqli-commit.xml mysqli-connect-errno.xml
mysqli-connect-error.xml mysqli-connect.xml mysqli-data-seek.xml mysqli-debug.xml mysqli-disable-reads-from-master.xml mysqli-disable-rpl-parse.xml
mysqli-dump-debug-info.xml mysqli-embedded-connect.xml mysqli-enable-reads-from-master.xml mysqli-enable-rpl-parse.xml mysqli-errno.xml
mysqli-error.xml mysqli-escape-string.xml mysqli-execute.xml mysqli-fetch-array.xml mysqli-fetch-assoc.xml mysqli-fetch-field-direct.xml
mysqli-fetch-field.xml mysqli-fetch-fields.xml mysqli-fetch-lengths.xml mysqli-fetch.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969359602@lists.php.net to get a copy of this message
baoengb Tue Mar 16 11:58:21 2004 EDT Added files: /phpdoc/en/reference/mysqli/mysqli/functions mysqli-affected-rows.xml mysqli-autocommit.xml mysqli-bind-param.xml mysqli-bind-result.xml mysqli-change-user.xml mysqli-character-set-name.xml mysqli-client-encoding.xml mysqli-close.xml mysqli-commit.xml mysqli-connect-errno.xml mysqli-connect-error.xml mysqli-connect.xml mysqli-data-seek.xml mysqli-debug.xml mysqli-disable-reads-from-master.xml mysqli-disable-rpl-parse.xml mysqli-dump-debug-info.xml mysqli-embedded-connect.xml mysqli-enable-reads-from-master.xml mysqli-enable-rpl-parse.xml mysqli-errno.xml mysqli-error.xml mysqli-escape-string.xml mysqli-execute.xml mysqli-fetch-array.xml mysqli-fetch-assoc.xml mysqli-fetch-field-direct.xml mysqli-fetch-field.xml mysqli-fetch-fields.xml mysqli-fetch-lengths.xml mysqli-fetch.xml Log: Agregando funciones traducidas de mysqli

http://cvs.php.net/co.php/phpdoc/en/reference/mysqli/mysqli/functions/mysqli-affected-rows.xml?r=1.1&p=1 Index: phpdoc/en/reference/mysqli/mysqli/functions/mysqli-affected-rows.xml +++ phpdoc/en/reference/mysqli/mysqli/functions/mysqli-affected-rows.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.16 Maintainer: baoengb Status: ready --> <refentry id="function.mysqli-affected-rows"> <refnamediv> <refname>mysqli_affected_rows</refname> <refname>mysqli->affected_rows</refname> <refpurpose>Obtiene el n&uacute;mero de filas afectadas en una operaci&oacute;n de MySQL previa</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <para>Estilo por procedimientos:</para> <methodsynopsis> <type>mixto</type><methodname>mysqli_affected_rows</methodname> <methodparam><type>objeto</type><parameter>identificador_de_enlace</parameter></methodparam> </methodsynopsis> <para>Estilo orientado a objetos (caracter&iacute;stica):</para> <classsynopsis> <ooclass><classname>mysqli</classname></ooclass> <fieldsynopsis><type>mixto</type><varname>affected_rows</varname></fieldsynopsis> </classsynopsis> <para> <function>mysqli_affected_rows</function> Regresa el n&uacute;mero de filas afectadas por la &uacute;ltima consulta INSERT, UPDATE, o DELETE asociada con el <parameter>identificador_de_enlace</parameter> dado. Si la &uacute;ltima consulta fue invalida, esta funci&oacute;n regresar&aacute; -1. </para> <note> <para> Para sentencias SELECT <function>mysqli_affected_rows</function> trabaja igual a <function>mysqli_num_rows</function>. </para> </note> <para> La funci&oacute;n <function>mysqli_affected_rows</function> s&oacoute;lo trabaja con consultas que modifican o afectan una tabla. En caso de que necesite el n&uacute;mero de filas de una consulta SELECT, use la funci&oacute;n <function>mysqli_num_rows</function> en su lugar. </para> </refsect1> <refsect1> <title>Valores Regresados</title> <para> Un entero mayor a cero indica el n&uacute;mero de filas afectadas u obtenidas. Cero indica que no se actualizaron registros para una sentencia UPDATE, no hubo coincidencias con la clausula WHERE en la consulta o que no se ha ejecutado a&uacute;n ninguna consulta. -1 indica que la consulta regreso un error. </para> <note> <para> Si el n&uacute;mero de filas afectadas es mayor que el valor entero m&aacute;ximo, entonces el n&uacute;mero de filas afectadas ser&aacute; regresado como una cadena. </para> </note> </refsect1> <refsect1> <title>Vea tambi&eacute;n</title> <para> <function>mysqli_num_rows</function>, <function>mysqli_info</function>. </para> </refsect1> <refsect1> <title>Ejemplos</title> <example> <title>Estilo orientado a objetos</title> <programlisting role="php"> <![CDATA[ <?php $mysqli = new mysqli("localhost", "my_user", "my_password", "world"); /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } /* Insert rows */ $mysqli->query("CREATE TABLE Language SELECT * from CountryLanguage"); printf("Affected rows (INSERT): %d\n", $mysqli->affected_rows); $mysqli->query("ALTER TABLE Language ADD Status int default 0"); /* update rows */ $mysqli->query("UPDATE Language SET Status=1 WHERE Percentage > 50"); printf("Affected rows (UPDATE): %d\n", $mysqli->affected_rows); /* delete rows */ $mysqli->query("DELETE FROM Language WHERE Percentage < 50"); printf("Affected rows (DELETE): %d\n", $mysqli->affected_rows); /* select all rows */ $result = $mysqli->query("SELECT CountryCode FROM Language"); printf("Affected rows (SELECT): %d\n", $mysqli->affected_rows); $result->close(); /* Delete table Language */ $mysqli->query("DROP TABLE Language"); /* close connection */ $mysqli->close(); ?> ]]> </programlisting> </example> <example> <title>Estilo por procedimientos</title> <programlisting role="php"> <![CDATA[ <?php $link = mysqli_connect("localhost", "my_user", "my_password", "world"); if (!$link) { printf("Can't connect to localhost. Error: %s\n", mysqli_connect_error()); exit(); } /* Insert rows */ mysqli_query($link, "CREATE TABLE Language SELECT * from CountryLanguage"); printf("Affected rows (INSERT): %d\n", mysqli_affected_rows($link)); mysqli_query($link, "ALTER TABLE Language ADD Status int default 0"); /* update rows */ mysqli_query($link, "UPDATE Language SET Status=1 WHERE Percentage > 50"); printf("Affected rows (UPDATE): %d\n", mysqli_affected_rows($link)); /* delete rows */ mysqli_query($link, "DELETE FROM Language WHERE Percentage < 50"); printf("Affected rows (DELETE): %d\n", mysqli_affected_rows($link)); /* select all rows */ $result = mysqli_query($link, "SELECT CountryCode FROM Language"); printf("Affected rows (SELECT): %d\n", mysqli_affected_rows($link)); mysqli_free_result($result); /* Delete table Language */ mysqli_query($link, "DROP TABLE Language"); /* close connection */ mysqli_close($link); ?> ]]> </programlisting> </example> <para> Los ejemplos anteriores producir&aacute;n la siguiente salida: </para> <screen> <![CDATA[ Affected rows (INSERT): 984 Affected rows (UPDATE): 168 Affected rows (DELETE): 815 Affected rows (SELECT): 169 ]]> </screen> </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/mysqli/mysqli/functions/mysqli-autocommit.xml?r=1.1&p=1 Index: phpdoc/en/reference/mysqli/mysqli/functions/mysqli-autocommit.xml +++ phpdoc/en/reference/mysqli/mysqli/functions/mysqli-autocommit.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.15 Maintainer: baoengb Status: ready --> <refentry id="function.mysqli-autocommit"> <refnamediv> <refname>mysqli_autocommit</refname> <refname> mysqli->auto_commit</refname> <refpurpose>Activa o desactiva la modificaci&oacute;n de auto-entrega de la base de datos</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <para>Estilo por procedimientos:</para> <methodsynopsis> <type>bool</type><methodname>mysqli_autocommit</methodname> <methodparam><type>objeto</type><parameter>identificador_de_enlace</parameter></methodparam> <methodparam><type>bool</type><parameter>modo</parameter></methodparam> </methodsynopsis> <para>Estilo orientado a objetos (m&eacute;todo)</para> <classsynopsis> <ooclass><classname>mysqli</classname></ooclass> <methodsynopsis> <type>bool</type> <methodname>auto_commit</methodname> <methodparam><type>bool</type><parameter>modo</parameter></methodparam> </methodsynopsis> </classsynopsis> <para> <function>mysqli_autocommit</function> Es usado para cambiar entre on u off el modo de auto-entrega en las consultas para la conexi&oacute;n a la base de datos representada por el objeto <parameter>identificador_de_enlace</parameter>. </para> <note> <para> <function>mysqli_autocommit</function> No funciona sobre tablas que no son del tipo transaccional (como MyISAM o ISAM). </para> <para> Para determinar el estado actual de auto-entrega use el comando SQL: 'SELECT @@autocommit'. </para> </note> </refsect1> <refsect1> <title>Valores que regresa</title> <para> &return.success; </para> </refsect1> <refsect1> <title>Vea tambi&eacute;n</title> <para> <function>mysqli_commit</function>, <function>mysqli_rollback</function>. </para> </refsect1> <refsect1> <title>Ejemplos</title> <example> <title>Estilo orientado a objetos</title> <programlisting role="php"> <![CDATA[ <?php $mysqli = new mysqli("localhost", "my_user", "my_password", "world"); if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } /* turn autocommit on */ $mysqli->autocommit(TRUE); if ($result = $mysqli->query("SELECT @@autocommit")) { $row = $result->fetch_row(); printf("Autocommit is %s\n", $row[0]); $result->free(); } /* close connection */ $mysqli->close(); ?> ]]> </programlisting> </example> <example> <title>Estilo por procedimientos</title> <programlisting role="php"> <![CDATA[ <?php $link = mysqli_connect("localhost", "my_user", "my_password", "world"); if (!$link) { printf("Can't connect to localhost. Error: %s\n", mysqli_connect_error()); exit(); } /* turn autocommit on */ mysqli_autocommit($link, TRUE); if ($result = mysqli_query($link, "SELECT @@autocommit")) { $row = mysqli_fetch_row($result); printf("Autocommit is %s\n", $row[0]); mysqli_free_result($result); } /* close connection */ mysqli_close($link); ?> ]]> </programlisting> </example> <para> Los ejemplos anteriores producir&aacute;n la siguiente salida: </para> <screen> <![CDATA[ Autocommit is 1 ]]> </screen> </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/mysqli/mysqli/functions/mysqli-bind-param.xml?r=1.1&p=1 Index: phpdoc/en/reference/mysqli/mysqli/functions/mysqli-bind-param.xml +++ phpdoc/en/reference/mysqli/mysqli/functions/mysqli-bind-param.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.10 Maintainer: baoengb Status: ready --> <refentry id="function.mysqli-bind-param"> <refnamediv> <refname>mysqli_bind_param</refname> <refpurpose>Alias para <function>mysqli_stmt_bind_param</function></refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <para> Esta funci&oacute;n es un alias de <function>mysqli_stmt_bind_param</function>. Para una descripci&oacute;n detallada vea <function>mysqli_stmt_bind_param</function>. </para> <note> <para> <function>mysqli_bind_param</function> es obsoleta y ser&aacute; removida. </para> </note> </refsect1> <refsect1> <title>Vea tambi&eacuite;n</title> <para> <function>mysqli_stmt_bind_param</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 --> http://cvs.php.net/co.php/phpdoc/en/reference/mysqli/mysqli/functions/mysqli-bind-result.xml?r=1.1&p=1 Index: phpdoc/en/reference/mysqli/mysqli/functions/mysqli-bind-result.xml +++ phpdoc/en/reference/mysqli/mysqli/functions/mysqli-bind-result.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.7 Maintainer: baoengb Status; ready --> <refentry id="function.mysqli-bind-result"> <refnamediv> <refname>mysqli_bind_result</refname> <refpurpose>Alias para <function>mysqli_stmt_bind_result</function></refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <para> Esta funci&oacute es un alias de <function>mysqli_stmt_bind_result</function>. Para una descripci&oacute;n detallada vea <function>mysqli_stmt_bind_result</function>. </para> <note> <para> <function>mysqli_bind_result</function> es obsoleta y ser&aacute; removida. </para> </note> </refsect1> <refsect1> <title>Vea tambi&eacute;n</title> <para> <function>mysqli_stmt_bind_result</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 --> http://cvs.php.net/co.php/phpdoc/en/reference/mysqli/mysqli/functions/mysqli-change-user.xml?r=1.1&p=1 Index: phpdoc/en/reference/mysqli/mysqli/functions/mysqli-change-user.xml +++ phpdoc/en/reference/mysqli/mysqli/functions/mysqli-change-user.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.11 Maintainer: baoengb Status: ready --> <refentry id="function.mysqli-change-user"> <refnamediv> <refname>mysqli_change_user</refname> <refname>mysqli->change_user</refname> <refpurpose>Cambia el usuario de la conexi&oacute;n a la base de datos especificada</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <para>Estilo por procedimientos:</para> <methodsynopsis> <type>bool</type><methodname>mysqli_change_user</methodname> <methodparam><type>object</type><parameter>identificador_de_enlace</parameter></methodparam> <methodparam><type>cadena</type><parameter>usuario</parameter></methodparam> <methodparam><type>cadena</type><parameter>contrase&ntilde;a</parameter></methodparam> <methodparam><type>cadena</type><parameter>base_de_datos</parameter></methodparam> </methodsynopsis> <para>Estilo orientado a objetos (m&eacute;todo):</para> <classsynopsis> <ooclass><classname>mysqli</classname></ooclass> <methodsynopsis> <type>bool</type> <methodname>change_user</methodname> <methodparam><type>cadena</type><parameter>usuario</parameter></methodparam> <methodparam><type>cadena</type><parameter>contrase&nacute;a</parameter></methodparam> <methodparam><type>cadena</type><parameter>base_de_datos</parameter></methodparam> </methodsynopsis> </classsynopsis> <para> <function>mysqli_change_user</function> Es usada para cambiar el usuario para la conexi&oacute;n de base de datos indicada por el par&aacute;metro <parameter>identificador_de_enlace</parameter> y para fijar la actual base de datos a la espec&iacute;ficada por el par&aacute;metro <parameter>base_de_datos</parameter>. </para> <para> Si se desea, se puede pasar el valor &null; en lugar del par&aacute;metro <parameter>base_de_datos</parameter> resultando en solo cambiar el usaurio y no seleccionar la base de datos. Para seleccionar una base de datos en este caso use la funci&oacute;n <function>mysqli_select_db</function>. </para> <para> Para poder cambiar de usuario de forma exitosa se debe proveer de un <parameter>usuario</parameter> y <parameter>contrase&ntilde;a</parameter> validos, y tales par&aacute;metros debe contar con los suficientes permisos para acceder a la base de datos deseada. Si por cualquier raz&oacute;n la autorizaci&oacute;n falla, el actual usuario autenticado permanecer&aacute; activo. </para> <note> <para> El uso de este comando siempre producir&aacute; que la conexi&oacute;n actual a la base de datos se comporte como si fuera una nueva conexi&oacute;n, sin importar si la operaci&oacute;n fue completada exitosamente. Este reinicio implica el hacer la restauraci&oacute;n no actualizada "rollback" de cualquier transacci&oacute;n activa, cerrar todas las tablas temporales y des-asegurar todas las tablas aseguradas. </para> </note> </refsect1> <refsect1> <title>Valores regresados</title> <para> &return.success; </para> </refsect1> <refsect1> <title>Vea tambi&eacute;n:</title> <para> <function>mysqli_connect</function> <function>mysqli_select_db</function> </para> </refsect1> <refsect1> <title>Ejemplos</title> <example> <title>Estilo orientado a objetos</title> <programlisting role="php"> <![CDATA[ <?php /* connect database test */ $mysqli = new mysqli("localhost", "my_user", "my_password", "test"); /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } /* Set Variable a */ $mysqli->query("SET @a:=1"); /* reset all and select a new database */ $mysqli->change_user("my_user", "my_password", "world"); if ($result = $mysqli->query("SELECT DATABASE()")) { $row = $result->fetch_row(); printf("Default database: %s\n", $row[0]); $result->close(); } if ($result = $mysqli->query("SELECT @a")) { $row = $result->fetch_row(); if ($row[0] === NULL) { printf("Value of variable a is NULL\n"); } $result->close(); } /* close connection */ $mysqli->close(); ?> ]]> </programlisting> </example> <example> <title>Estilo por procedimientos</title> <programlisting role="php"> <![CDATA[ <?php /* connect database test */ $link = mysqli_connect("localhost", "my_user", "my_password", "test"); /* check connection */ if (!$link) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } /* Set Variable a */ mysqli_query($link, "SET @a:=1"); /* reset all and select a new database */ mysqli_change_user($link, "my_user", "my_password", "world"); if ($result = mysqli_query($link, "SELECT DATABASE()")) { $row = mysqli_fetch_row($result); printf("Default database: %s\n", $row[0]); mysqli_free_result($result); } if ($result = mysqli_query($link, "SELECT @a")) { $row = mysqli_fetch_row($result); if ($row[0] === NULL) { printf("Value of variable a is NULL\n"); } mysqli_free_result($result); } /* close connection */ mysqli_close($link); ?> ]]> </programlisting> </example> <para> Los ejemplos anteriores producir&aacute;n la siguiente salida: </para> <screen> <![CDATA[ Default database: world Value of variable a is NULL ]]> </screen> </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/mysqli/mysqli/functions/mysqli-character-set-name.xml?r=1.1&p=1 Index: phpdoc/en/reference/mysqli/mysqli/functions/mysqli-character-set-name.xml +++ phpdoc/en/reference/mysqli/mysqli/functions/mysqli-character-set-name.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.11 Maintainer: baoengb Status: ready --> <refentry id="function.mysqli-character-set-name"> <refnamediv> <refname>mysqli_character_set_name</refname> <refname>mysqli->character_set_name</refname> <refpurpose>Regresa el conjunto de caracteres determinados por default para la conexi&oacute;n de base de datos</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <para>Estilo por procedumientos:</para> <methodsynopsis> <type>cadena</type><methodname>mysqli_character_set_name</methodname> <methodparam><type>objeto</type><parameter>identificador_de_enlace</parameter></methodparam> </methodsynopsis> <para>Estilo orientado a objetos (m&eacute;todo):</para> <classsynopsis> <ooclass><classname>mysqli</classname></ooclass> <methodsynopsis> <type>cadena</type> <methodname>character_set_name</methodname> <methodparam><type>void</type><parameter></parameter></methodparam> </methodsynopsis> </classsynopsis> <para> Regresa el conjuntos de caracteres actual, determinado para la conexi&oacute;n de base de datos espec&iacute;ficada por el par&aacute;metro <parameter>identificador_de_enlace</parameter>. </para> </refsect1> <refsect1> <title>Valores regresados</title> <para>El conjunto de caracteres por defecto, determinados para la conexi&oacute;n actual</para> </refsect1> <refsect1> <title>Vea tambi&eacute;n</title> <para> <function>mysqli_client_encoding</function>. <function>mysqli_real_escape_string</function>. </para> </refsect1> <refsect1> <title>Ejemplos</title> <example> <title>Estilo orientado a objetos</title> <programlisting role="php"> <![CDATA[ <?php /* Open a connection */ $mysqli = new mysqli("localhost", "my_user", "my_password", "world"); /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } /* Print current character set */ $charset = $mysqli->character_set_name(); printf ("Current character set is %s\n", $charset); $mysqli->close(); ?> ]]> </programlisting> </example> <example> <title>Estilo por procedimientos</title> <programlisting role="php"> <![CDATA[ <?php /* Open a connection */ $link = mysqli_connect("localhost", "my_user", "my_password", "world"); /* check connection */ if (!$link) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } /* Print current character set */ $charset = mysqli_character_set_name($link); printf ("Current character set is %s\n",$charset); /* close connection */ mysqli_close($link); ?> ]]> </programlisting> </example> <para> Los ejemplos anteriores producir&aacute;n la siguiente salida: </para> <screen> <![CDATA[ Current character set is latin1_swedish_ci ]]> </screen> </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/mysqli/mysqli/functions/mysqli-client-encoding.xml?r=1.1&p=1 Index: phpdoc/en/reference/mysqli/mysqli/functions/mysqli-client-encoding.xml +++ phpdoc/en/reference/mysqli/mysqli/functions/mysqli-client-encoding.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.4 Maintainer: baoengb Status: ready --> <refentry id="function.mysqli-client-encoding"> <refnamediv> <refname>mysqli_client_encoding</refname> <refpurpose>Alias de <function>mysqli_character_set_name</function></refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <para> Esta funci&oacute;n es un alias de <function>mysqli_character_set_name</function>. Para una descripci&oacute;n detallada vea <function>mysqli_character_set_name</function>. </para> </refsect1> <refsect1> <title>Vea tambi&eacute;n</title> <para> <function>mysqli_client_encoding</function>. <function>mysqli_real_escape_string</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 --> http://cvs.php.net/co.php/phpdoc/en/reference/mysqli/mysqli/functions/mysqli-close.xml?r=1.1&p=1 Index: phpdoc/en/reference/mysqli/mysqli/functions/mysqli-close.xml +++ phpdoc/en/reference/mysqli/mysqli/functions/mysqli-close.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.8 Maintainer: baoengb Status: ready --> <refentry id="function.mysqli-close"> <refnamediv> <refname>mysqli_close</refname> <refname>mysqli->close</refname> <refpurpose>Cierra la conexi&oacute;n de base de datos previamente abierta</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <para>Estilo por procedimientos:</para> <methodsynopsis> <type>bool</type><methodname>mysqli_close</methodname> <methodparam><type>objeto</type><parameter>identificador_de_enlace</parameter></methodparam> </methodsynopsis> <para>Estilo orientado a objetos (m&eacute;todo):</para> <classsynopsis> <ooclass><classname>mysqli</classname></ooclass> <methodsynopsis> <type>bool</type> <methodname>close</methodname> <methodparam><type>void</type><parameter></parameter></methodparam> </methodsynopsis> </classsynopsis> <para> La funci&oacute;n <function>mysqli_close</function> cierra una conexi&oacute;n de base de datos previamente abierta, espec&iacute;ficada por el par&aacute;metro <parameter>identificador_de_enlace<parameter>. </para> </refsect1> <refsect1> <title>Valores regresados</title> <para> &return.success; </para> </refsect1> <refsect1> <title>Vea tambi&eacute;n</title> <para> <function>mysqli_connect</function>, <function>mysqli_init</function>, <function>mysqli_real_connect</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 --> http://cvs.php.net/co.php/phpdoc/en/reference/mysqli/mysqli/functions/mysqli-commit.xml?r=1.1&p=1 Index: phpdoc/en/reference/mysqli/mysqli/functions/mysqli-commit.xml +++ phpdoc/en/reference/mysqli/mysqli/functions/mysqli-commit.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.9 Maintainer: baoengb Status: ready --> <refentry id="function.mysqli-commit"> <refnamediv> <refname>mysqli_commit</refname> <refname>mysqli->commit</refname> <refpurpose>Completa la transacci&oacute;n actual</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <para>Estilo por procedimientos:</para> <methodsynopsis> <type>bool</type><methodname>mysqli_commit</methodname> <methodparam><type>objeto</type><parameter>identificador_de_enlace</parameter></methodparam> </methodsynopsis> <para>Estilo orientado a objetos (m&eacute;todo)</para> <classsynopsis> <ooclass><classname>mysqli</classname></ooclass> <methodsynopsis> <type>bool</type> <methodname>commit</methodname> <methodparam><type>void</type><parameter></parameter></methodparam> </methodsynopsis> </classsynopsis> <para> Entrega la transacci&oacute;n actual para la conexi&oacute;n de base de datos espec&iacute;ficada por el parametro <parameter>link</parameter>. </para> </refsect1> <refsect1> <title>Valores regresados</title> <para> &return.success; </para> </refsect1> <refsect1> <title>Vea tambi&eacute;n</title> <para> <function>mysqli_autocommit</function>, <function>mysqli_rollback</function>. </para> </refsect1> <refsect1> <title>Ejemplos</title> <para> <example> <title>Estilo orientado a objetos</title> <programlisting role="php"> <![CDATA[ <?php $mysqli = new mysqli("localhost", "my_user", "my_password", "world"); /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } $mysqli->query("CREATE TABLE Language LIKE CountryLanguage Type=InnoDB"); /* set autocommit to off */ $mysqli->autocommit(FALSE); /* Insert some values */ $mysqli->query("INSERT INTO Language VALUES ('DEU', 'Bavarian', 'F', 11.2)"); $mysqli->query("INSERT INTO Language VALUES ('DEU', 'Swabian', 'F', 9.4)"); /* commit transaction */ $mysqli->commit(); /* drop table */ $mysqli->query("DROP TABLE Language"); /* close connection */ $mysqli->close(); ?> ]]> </programlisting> </example> <example> <title>Estilo por procedimientos</title> <programlisting role="php"> <![CDATA[ <?php $link = mysqli_connect("localhost", "my_user", "my_password", "test"); /* check connection */ if (!$link) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } /* set autocommit to off */ mysqli_autocommit($link, FALSE); mysqli_query($link, "CREATE TABLE Language LIKE CountryLanguage Type=InnoDB"); /* Insert some values */ mysqli_query($link, "INSERT INTO Language VALUES ('DEU', 'Bavarian', 'F', 11.2)"); mysqli_query($link, "INSERT INTO Language VALUES ('DEU', 'Swabian', 'F', 9.4)"); /* commit transaction */ mysqli_commit($link); /* close connection */ mysqli_close($link); ?> ]]> </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/mysqli/mysqli/functions/mysqli-connect-errno.xml?r=1.1&p=1 Index: phpdoc/en/reference/mysqli/mysqli/functions/mysqli-connect-errno.xml +++ phpdoc/en/reference/mysqli/mysqli/functions/mysqli-connect-errno.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.5 Maintainer: baoengb Status: ready --> <refentry id="function.mysqli-connect-errno"> <refnamediv> <refname>mysqli_connect_errno</refname> <refpurpose>Regresa el c&oacute;digo de error de la &uacute;ltima llamada a la conexi&oacute;n</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> <type>int</type><methodname>mysqli_connect_errno</methodname> <methodparam><type>void</type><parameter></parameter></methodparam> </methodsynopsis> <para> La funci&oacute;n <function>mysqli_connect_errno</function> regresar&aacute; el &uacute;ltumo c&oacute;digo de error generado por <function>mysqli_connect</function>. Si no han ocurrido errores, esta funci&oacute;n regresar&aacute; cero. </para> <note> <para> Los n&uacute;meros de error del cliente, est&aacute;n listados en el archivo de MySQL <filename>errmsg.h</filename>. Los n&uacute;meros de error del servidor, est&aacute;n listados en el archivo de MySQL <filename>mysqld_error.h</filename>. En la distribuci&oacute;n de las fuentes de MySQL, tu puedes encontrar una lista completa de los mensajes de error y de los n&uacute;meros de error en el documento <filename>Docs/mysqld_error.txt</filename>. </para> </note> </refsect1> <refsect1> <title>Valores regresados</title> <para> Un c&oacute;digo de error para la &uacute;ltima llamada a <function>mysqli_connect</function>, si &eacute;sta falla. Si no hay error entonces se regresa Cero. </para> </refsect1> <refsect1> <title>Vea tambi&eacute;n</title> <para> <function>mysqli_connect</function>, <function>mysqli_connect_error</function>, <function>mysqli_errno</function>, <function>mysqli_error</function>, <function>mysqli_sqlstate</function> </para> </refsect1> <refsect1> <title>Ejemplo</title> <para> <example> <title>mysqli_connect_errno</title> <programlisting role="php"> <![CDATA[ <?php $link = @mysqli_connect("localhost", "nonexisting_user", ""); if (!$link) { printf("Can't connect to localhost. Errorcode: %d\n", mysqli_connect_errno()); } ?> ]]> </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/mysqli/mysqli/functions/mysqli-connect-error.xml?r=1.1&p=1 Index: phpdoc/en/reference/mysqli/mysqli/functions/mysqli-connect-error.xml +++ phpdoc/en/reference/mysqli/mysqli/functions/mysqli-connect-error.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.5 Maintainer: baoengb Status: ready --> <refentry id="function.mysqli-connect-error"> <refnamediv> <refname>mysqli_connect_error</refname> <refpurpose>Regresa una descripci&oacute;n del &uacute;ltimo error de la conexi&oacute;n</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> <type>cadena</type><methodname>mysqli_connect_error</methodname> <methodparam><type>void</type><parameter></parameter></methodparam> </methodsynopsis> <para> La funci&oacute;n <function>mysqli_connect_error</function> es identica a la funci&oacute;n <function>mysqli_connect_errno</function>, excepto en que en vez de regresar el n&uacute;mero del c&oacute;digo de error, la funci&oacute;n <function>mysqli_connect_error</function> regresar&aacute; el mensaje de error correspondiente a la &uacute;ltima llamada a la funci&oacute;n <function>mysqli_connect</function>. Si no ha ocurrido error, est&aacute; funci&oacute;n regresar&aacute; una cadena vac&iacute;a. </para> </refsect1> <refsect1> <title>Valores regresados</title> <para> Una cadena que describe el error o una cadena vac&iacute;a si no ha ocurrido error. </para> </refsect1> <refsect1> <title>Vea tambi&eacute;n</title> <para> <function>mysqli_connect</function>, <function>mysqli_connect_errno</function>, <function>mysqli_errno</function>, <function>mysqli_error</function>, <function>mysqli_sqlstate</function> </para> </refsect1> <refsect1> <title>Ejemplo</title> <para> <example> <title>mysqli_connect_error</title> <programlisting role="php"> <![CDATA[ <?php $link = @mysqli_connect("localhost", "nonexisting_user", ""); if (!$link) { printf("Can't connect to localhost. Error: %s\n", mysqli_connect_error()); } ?> ]]> </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/mysqli/mysqli/functions/mysqli-connect.xml?r=1.1&p=1 Index: phpdoc/en/reference/mysqli/mysqli/functions/mysqli-connect.xml +++ phpdoc/en/reference/mysqli/mysqli/functions/mysqli-connect.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.15 Maintainer: baoengb Status: ready --> <refentry id="function.mysqli-connect"> <refnamediv> <refname>mysqli_connect</refname> <refname>mysqli()</refname> <refpurpose>Abre una nueva conexi&oacute;n al servidor MySQL</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <para>Estilo por procedimientos</para> <methodsynopsis> <type>objeto</type><methodname>mysqli_connect</methodname> <methodparam choice='opt'><type>cadena</type><parameter>equipo_anfitri&oacute;n</parameter></methodparam> <methodparam choice='opt'><type>cadena</type><parameter>usuario</parameter></methodparam> <methodparam choice='opt'><type>cadena</type><parameter>contrase&ntilde;a</parameter></methodparam> <methodparam choice='opt'><type>cadena</type><parameter>base_de_datos</parameter></methodparam> <methodparam choice='opt'><type>int</type><parameter>puerto</parameter></methodparam> <methodparam choice='opt'><type>cadena</type><parameter>socket</parameter></methodparam> </methodsynopsis> <para>Estilo orientado a objetos (constructor):</para> <classsynopsis> <ooclass><classname>mysqli</classname></ooclass> <constructorsynopsis> <methodname>__construct</methodname> <methodparam choice='opt'><type>cadena</type><parameter>equipo_anfitri&oacute;n</parameter></methodparam> <methodparam choice='opt'><type>cadena</type><parameter>usuario</parameter></methodparam> <methodparam choice='opt'><type>cadena</type><parameter>contrase&ntilde;a</parameter></methodparam> <methodparam choice='opt'><type>cadena</type><parameter>base_de_datos</parameter></methodparam> <methodparam choice='opt'><type>int</type><parameter>puerto</parameter></methodparam> <methodparam choice='opt'><type>cadena</type><parameter>socket</parameter></methodparam> </constructorsynopsis> </classsynopsis> <para> La funci&oacute;n <function>mysqli_connect</function> intenta abrir una conexi&oacute;n al servidor MySQL que se est&aacute; ejecutando en <parameter>equipo_afitri&oacute;n</parameter> el cual puede ser el nombre de un equipo o una direcci&oacute;n IP. Pasando el valor &null; o la cadena "localhost" a este par&aacute;metro, se asume que est&aacute; en el mismo equipo. Cuando sea posible se usar&Acute; "pipes" en vez del protocolo TCP/IP. En caso exitoso, la funci&oacute;n <function>mysqli_connect</function> regresar&aacute; un objeto representando la conexi&oacute;n a la base de datos, o &false; en caso contrario. </para> <para> En los par&aacute;metros <parameter>usuario</parameter> y <parameter>contrase&ntilde;a</parameter> se espec&iacute;fica el nombre de usuario y contrase&ntilde;a con los cuales se debe conectar al servidor MySQL. Si no se da contrase&ntilde;a el valor &null; es tomado, el servidor MySQL intentar&aacute; verificar al usuario contra los registros de usuarios que esten sin contrase&ntilde;a. Esto permite que un usuario pueda ser usado con diferentes permisos (dependiendo si se provee contrase&ntilde;a o no). </para> <para> Si se espec&iacute;fica el par&aacute;metro <parameter>base_de_datos</parameter> especificar&aacute; la base de datos a usar por defecto cuando se ejecuten consultas. </para> <para> Los par&aacute;metros <parameter>puerto</parameter> y <parameter>socket</parameter> son usados junto con el par&aacute;metro <parameter>equipo_anfitri&oacute;n</parameter> para controla a futuro como conectar al servidor de base de datos. El par&aacute;metro <parameter>puerto</parameter> espec&iacute;fica el n&uacute;mero de puerto al que se intenta conectar en el servidor MySQL, mientras que el par&aacute;metro <parameter>socket</parameter> espec&iacute;fica el socket o la pipa nombrada "pipe" que debe ser usada. </para> <note> <para> Especificar el par&aacute;metro <parameter>socket</parameter> no determina expl&iacute;citamente el tipo de conexi&oacute;n a ser usado cuando se conecta al servidor MySQL. El par&aacute;metro <parameter>equipo_anfitri&oacute;n</parameter> determina como se hace la conexi&oacute;n a la base de datos MySQL. </para> </note> </refsect1> <refsect1> <title>Valores regresados</title> <para> Regresa un objeto el cu&aacute;l representa la conexi&oacute;n al servidor MySQL o &false; en caso contrario. </para> </refsect1> <refsect1> <title>Ejemplos</title> <example> <title>Estilo orientado a objetos</title> <programlisting role="php"> <![CDATA[ <?php $mysqli = new mysqli("localhost", "my_user", "my_password", "world"); /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } printf("Host information: %s\n", $mysqli->host_info); /* close connection */ $mysqli->close(); ?> ]]> </programlisting> </example> <example> <title>Estilo por procedimientos</title> <programlisting role="php"> <![CDATA[ <?php $link = mysqli_connect("localhost", "my_user", "my_password", "world"); /* check connection */ if (!$link) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } printf("Host information: %s\n", mysqli_get_host_info($link)); /* close connection */ mysqli_close($link); ?> ]]> </programlisting> </example> <para> Los ejemplos anteriores producir&aacute;n la siguiente salida: </para> <screen> <![CDATA[ Host information: Localhost via UNIX socket ]]> </screen> </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/mysqli/mysqli/functions/mysqli-data-seek.xml?r=1.1&p=1 Index: phpdoc/en/reference/mysqli/mysqli/functions/mysqli-data-seek.xml +++ phpdoc/en/reference/mysqli/mysqli/functions/mysqli-data-seek.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.14 Maintainer: baoengb Status: ready --> <refentry id="function.mysqli-data-seek"> <refnamediv> <refname>mysqli_data_seek</refname> <refname>result->data_seek</refname> <refpurpose>Ajusta el apuntador arbitrariamente a una fila en el resultado</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <para>Estilo por procedimientos:</para> <methodsynopsis> <type>bool</type><methodname>mysqli_data_seek</methodname> <methodparam><type>objeto</type><parameter>resultado</parameter></methodparam> <methodparam><type>int</type><parameter>posici&oacute;n</parameter></methodparam> </methodsynopsis> <para>Estilo orientado a objetos (m&eacute;todo):</para> <classsynopsis> <ooclass><classname>resultado</classname></ooclass> <methodsynopsis> <type>bool</type> <methodname>data_seek</methodname> <methodparam><type>int</type><parameter>posici&oacute;n</parameter></methodparam> </methodsynopsis> </classsynopsis> <para> La funci&oacute;n <function>mysqli_data_seek</function> busca arbitrariamente apuntar al valor espec&iacute;ficado por <parameter>posici&oacute;n</parameter> en el conjunto resultante representado por <parameter>result</parameter>. Los valores del par&aacute;metro <parameter>posici&oacute;n</parameter> deben estar entre cero y el total de filas menus uno (0 .. <function>mysqli_num_rows</function> - 1). </para> <note> <para> Est&aacute; funci&oacute;n solo puede ser usada con resultados sin almacenamiento intermedio logrados por el uso de las funciones <function>mysqli_store_result</function> o <function>mysqli_query</function>. </para> </note> </refsect1> <refsect1> <title>Valores regresados</title> <para> &return.success; </para> </refsect1> <refsect1> <title>Vea tambi&eacute;n</title> <para> <function>mysqli_store_result</function>, <function>mysqli_fetch_row</function>, <function>mysqli_num_rows</function>. </para> </refsect1> <refsect1> <title>Ejemplos</title> <example> <title>Estilo orientado a onjetos</title> <programlisting role="php"> <![CDATA[ <?php /* Open a connection */ $mysqli = new mysqli("localhost", "my_user", "my_password", "world"); /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } $query = "SELECT Name, CountryCode FROM City ORDER BY Name"; if ($result = $mysqli->query( $query)) { /* seek to row no. 400 */ $result->data_seek(399); /* fetch row */ $row = $result->fetch_row(); printf ("City: %s Countrycode: %s\n", $row[0], $row[1]); /* free result set*/ $result->close(); } /* close connection */ $mysqli->close(); ?> ]]> </programlisting> </example> <example> <title>Estilo por procedimientos</title> <programlisting role="php"> <![CDATA[ <?php /* Open a connection */ $link = mysqli_connect("localhost", "my_user", "my_password", "world"); /* check connection */ if (!$link) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } $query = "SELECT Name, CountryCode FROM City ORDER BY Name"; if ($result = mysqli_query($link, $query)) { /* seek to row no. 400 */ mysqli_data_seek($result, 399); /* fetch row */ $row = mysqli_fetch_row($result); printf ("City: %s Countrycode: %s\n", $row[0], $row[1]); /* free result set*/ mysqli_free_result($result); } /* close connection */ mysqli_close($link); ?> ]]> </programlisting> </example> <para> Los ejemplos anteriores producir&aacute;n la siguiente salida: </para> <screen> <![CDATA[ City: Benin City Countrycode: NGA ]]> </screen> </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/mysqli/mysqli/functions/mysqli-debug.xml?r=1.1&p=1 Index: phpdoc/en/reference/mysqli/mysqli/functions/mysqli-debug.xml +++ phpdoc/en/reference/mysqli/mysqli/functions/mysqli-debug.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.9 Maintainer: baoengb Status: ready --> <refentry id="function.mysqli-debug"> <refnamediv> <refname>mysqli_debug</refname> <refpurpose>Realiza operaciones de rastreo de errores</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> <type>void</type><methodname>mysqli_debug</methodname> <methodparam><type>cadena</type><parameter>acci&oacute;n</parameter></methodparam> </methodsynopsis> <para> La funci&oacute;n <function>mysqli_debug</function> es usada para realizar operaciones de rastreo y eliminaci&oacute;n de errores utilizando la libreria "Fred Fish". El par&aacute;metro <parameter>acci&oacute;n</parameter> es una cadena que representa las operaciones de rastreo de errores a realizar. </para> <note> <para> Para usar la funci&oacute; <function>mysqli_debug</function> se debe compilar el cliente de MySQL con soporte para rastreo de errores "debugging". </para> </note> </refsect1> <refsect1> <title>Valores regresados</title> <para><function>mysqli_debug</function> no regresa ning&uacute;n valor.</para> </refsect1> <refsect1> <title>Vea tambi&eacute;n</title> <para> <function>mysqli_dump_debug_info</function>, <function>mysqli_report</function> </para> </refsect1> <refsect1> <title>Ejemplo</title> <para> <example> <title>Generar un archivo de rastreo</title> <programlisting role="php"> <![CDATA[ <?php /* Create a trace file in '/tmp/client.trace' on the local (client) machine: */ mysqli_debug("d:t:0,/tmp/client.trace"); ?> ]]> </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/mysqli/mysqli/functions/mysqli-disable-reads-from-master.xml?r=1.1&p=1 Index: phpdoc/en/reference/mysqli/mysqli/functions/mysqli-disable-reads-from-master.xml +++ phpdoc/en/reference/mysqli/mysqli/functions/mysqli-disable-reads-from-master.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.5 Maintainer: baoengb Status: ready --> <refentry id="function.mysqli-disable-reads-from-master"> <refnamediv> <refname>mysqli_disable_reads_from_master</refname> <refpurpose></refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> <type>void</type><methodname>mysqli_disable_reads_from_master</methodname> <methodparam><type>int</type><parameter>identificador_de_enlace</parameter></methodparam> </methodsynopsis> &warn.experimental.func; </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/mysqli/mysqli/functions/mysqli-disable-rpl-parse.xml?r=1.1&p=1 Index: phpdoc/en/reference/mysqli/mysqli/functions/mysqli-disable-rpl-parse.xml +++ phpdoc/en/reference/mysqli/mysqli/functions/mysqli-disable-rpl-parse.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.7 Maintainer: baoengb Status: ready --> <refentry id="function.mysqli-disable-rpl-parse"> <refnamediv> <refname>mysqli_disable_rpl_parse</refname> <refpurpose></refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> <type>void</type><methodname>mysqli_disable_rpl_parse</methodname> <methodparam><type>objeto</type><parameter>identificador_de_enlace</parameter></methodparam> </methodsynopsis> &warn.experimental.func; </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/mysqli/mysqli/functions/mysqli-dump-debug-info.xml?r=1.1&p=1 Index: phpdoc/en/reference/mysqli/mysqli/functions/mysqli-dump-debug-info.xml +++ phpdoc/en/reference/mysqli/mysqli/functions/mysqli-dump-debug-info.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.9 Maintainer: baoengb Status: ready --> <refentry id="function.mysqli-dump-debug-info"> <refnamediv> <refname>mysqli_dump_debug_info</refname> <refname>mysqli->dump_debug_info</refname> <refpurpose>Vac&iacute;a informaci&oacute;n de rastreo de errores en el log</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> <type>bool</type><methodname>mysqli_dump_debug_info</methodname> <methodparam><type>objeto</type><parameter>identificador_de_enlace</parameter></methodparam> </methodsynopsis> <para> Esta funci&oacute;n est&aacute; dise&ntilde;ada para ser ejecutada por un usaurio con privilegios de SUPER usuario y es usada para vaciar la informaci&oacute;n de rastreo de errores en el log del servidor MySQL relacionado a la conexi&oacute;n espec&iacute;ficada por el par&aacute;metro <parameter>identificador_de_enlace</parameter>. </para> </refsect1> <refsect1> <title>Valores regresados</title> <para> &return.success; </para> </refsect1> <refsect1> <title>Vea tambi&eacute;n</title> <para> <function>mysqli_debug</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 --> http://cvs.php.net/co.php/phpdoc/en/reference/mysqli/mysqli/functions/mysqli-embedded-connect.xml?r=1.1&p=1 Index: phpdoc/en/reference/mysqli/mysqli/functions/mysqli-embedded-connect.xml +++ phpdoc/en/reference/mysqli/mysqli/functions/mysqli-embedded-connect.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.4 Maintainer: baoengb Status: ready --> <refentry id="function.mysqli-embedded-connect"> <refnamediv> <refname>mysqli_embedded_connect</refname> <refpurpose>Abre una conexi&oacute; a un servidor MySQL embebido.</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> <type>object</type><methodname>mysqli_embedded_connect</methodname> <methodparam><type>void</type><parameter></parameter></methodparam> </methodsynopsis> &warn.experimental.func; </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/mysqli/mysqli/functions/mysqli-enable-reads-from-master.xml?r=1.1&p=1 Index: phpdoc/en/reference/mysqli/mysqli/functions/mysqli-enable-reads-from-master.xml +++ phpdoc/en/reference/mysqli/mysqli/functions/mysqli-enable-reads-from-master.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.8 Maintainer: baoengb Status: ready --> <refentry id="function.mysqli-enable-reads-from-master"> <refnamediv> <refname>mysqli_enable_reads_from_master</refname> <refpurpose></refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> <type>void</type><methodname>mysqli_enable_reads_from_master</methodname> <methodparam><type>objeto</type><parameter>identificador_de_enlace</parameter></methodparam> </methodsynopsis> &warn.experimental.func; </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/mysqli/mysqli/functions/mysqli-enable-rpl-parse.xml?r=1.1&p=1 Index: phpdoc/en/reference/mysqli/mysqli/functions/mysqli-enable-rpl-parse.xml +++ phpdoc/en/reference/mysqli/mysqli/functions/mysqli-enable-rpl-parse.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.8 Maintainer: baoengb Status: ready --> <refentry id="function.mysqli-enable-rpl-parse"> <refnamediv> <refname>mysqli_enable_rpl_parse</refname> <refpurpose></refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> <type>void</type><methodname>mysqli_enable_rpl_parse</methodname> <methodparam><type>objeto</type><parameter>identificador_de_enlace</parameter></methodparam> </methodsynopsis> &warn.experimental.func; </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/mysqli/mysqli/functions/mysqli-errno.xml?r=1.1&p=1 Index: phpdoc/en/reference/mysqli/mysqli/functions/mysqli-errno.xml +++ phpdoc/en/reference/mysqli/mysqli/functions/mysqli-errno.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.10 Maintainer: baoengb Status: ready --> <refentry id="function.mysqli-errno"> <refnamediv> <refname>mysqli_errno</refname> <refname>mysql->errno</refname> <refpurpose>Regresa el c&oacute;digo de error para la funci&oacute;n m&aacute;s recientemente llamada</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <para>Estilo por procedimientos:</para> <methodsynopsis> <type>int</type><methodname>mysqli_errno</methodname> <methodparam><type>objeto</type><parameter>identificador_de_enlace</parameter></methodparam> </methodsynopsis> <para>Estilo orientado a objetos (propiedad):</para> <classsynopsis> <ooclass><classname>mysqli</classname></ooclass> <fieldsynopsis><type>int</type><varname>errno</varname></fieldsynopsis> </classsynopsis> <para> La funci&oacute;n <function>mysqli_errno</function> regresar&aacute; el &uacute;ltimo c&oacute;digo de error para la funci&oacute;n de MySQLi m&aacute;s recientemente llamada, que pueda ser exitosa o fallar con respecto al identificador de enlace a la base de datos definido por el par&aacute;metro <parameter>identificador_de_enlace</parameter>. Si no han ocurrido errores, est&aacute; funci&oacute;n regresar&aacute; cero. </para> <note> <para> Los n&uacute;meros de error del cliente, est&aacute;n listados en el archivo de MySQL <filename>errmsg.h</filename>. Los n&uacute;meros de error del servidor, est&aacute;n listados en el archivo de MySQL <filename>mysqld_error.h</filename>. En la distribuci&oacute;n de las fuentes de MySQL, tu puedes encontrar una lista completa de los mensajes de error y de los n&uacute;meros de error en el documento <filename>Docs/mysqld_error.txt</filename>. </para> </note> </refsect1> <refsect1> <title>Valores regresados</title> <para> Un valor de c&oacute;digo de error para la &uacute;ltima llamada si fall&oacute;. Cero significa que no han ocurrido errores. </para> </refsect1> <refsect1> <title>Vea tambi&eacute;n</title> <para> <function>mysqli_connect_errno</function>, <function>mysqli_connect_error</function>, <function>mysqli_error</function>, <function>mysqli_sqlstate</function> </para> </refsect1> <refsect1> <title>Ejemplos</title> <example> <title>Estilo orientado a objetos</title> <programlisting role="php"> <![CDATA[ <?php $mysqli = new mysqli("localhost", "my_user", "my_password", "world"); /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } if (!$mysqli->query("SET a=1")) { printf("Errorcode: %d\n", $mysqli->errno); } /* close connection */ $mysqli->close(); ?> ]]> </programlisting> </example> <example> <title>Estilo por procedimientos</title> <programlisting role="php"> <![CDATA[ <?php $link = mysqli_connect("localhost", "my_user", "my_password", "world"); /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } if (!mysqli_query($link, "SET a=1")) { printf("Errorcode: %d\n", mysqli_errno($link)); } /* close connection */ mysqli_close($link); ?> ]]> </programlisting> </example> <para> Los ejemplos anteriores producir&aacute;n la siguiente salida: </para> <screen> <![CDATA[ Errorcode: 1193 ]]> </screen> </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/mysqli/mysqli/functions/mysqli-error.xml?r=1.1&p=1 Index: phpdoc/en/reference/mysqli/mysqli/functions/mysqli-error.xml +++ phpdoc/en/reference/mysqli/mysqli/functions/mysqli-error.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.12 Maintainer: baoengb Status: ready --> <refentry id="function.mysqli-error"> <refnamediv> <refname>mysqli_error</refname> <refpurpose>Regresa una cadena con la descripci&oacute; del &uacute;ltimo error</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <para>Estilo por procedimientos:</para> <methodsynopsis> <type>cadena</type><methodname>mysqli_error</methodname> <methodparam><type>objeto</type><parameter>identificador_de_enlace</parameter></methodparam> </methodsynopsis> <para>Estilo orientado a objetos (propiedad)</para> <classsynopsis> <ooclass><classname>mysqli</classname></ooclass> <fieldsynopsis><type>cadena</type><varname>error</varname></fieldsynopsis> </classsynopsis> <para> La funci&oacute; <function>mysqli_error</function> es identica a la correspondiente <function>mysqli_errno</function> en todos los sentidos, excepto en que en lugar de regresar un valor num&eacute;rico, la funci&oacute;n <function>mysqli_error</function> regresar&aacute; un mensaje de error, representando el &uacute;ltimo error ocurrido para la conexi&oacute; de base de datos <parameter>identificador_de_enlace</parameter>. Si no han ocurrido errores, est&aacute; funci&oacute;n regresar&aacute; una cadena vac&iacute;a. </para> </refsect1> <refsect1> <title>Valores regresados</title> <para> Una cadena que describe el error. Una cadena vac&iacute;a si no han ocurrido errores. </para> </refsect1> <refsect1> <title>Vea tambi&eacute;n</title> <para> <function>mysqli_connect_errno</function>, <function>mysqli_connect_error</function>, <function>mysqli_errno</function>, <function>mysqli_sqlstate</function> </para> </refsect1> <refsect1> <title>Ejemplos</title> <example> <title>Estilo orientado a objetos</title> <programlisting role="php"> <![CDATA[ <?php $mysqli = new mysqli("localhost", "my_user", "my_password", "world"); /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } if (!$mysqli->query("SET a=1")) { printf("Errormessage: %s\n", $mysqli->error); } /* close connection */ $mysqli->close(); ?> ]]> </programlisting> </example> <example> <title>Estilo por procedimientos</title> <programlisting role="php"> <![CDATA[ <?php $link = mysqli_connect("localhost", "my_user", "my_password", "world"); /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } if (!mysqli_query($link, "SET a=1")) { printf("Errormessage: %s\n", mysqli_error($link)); } /* close connection */ mysqli_close($link); ?> ]]> </programlisting> </example> <para> Los ejemplos anteriores producir&aacute;n la siguiente salida: </para> <screen> <![CDATA[ Errormessage: Unknown system variable 'a' ]]> </screen> </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/mysqli/mysqli/functions/mysqli-escape-string.xml?r=1.1&p=1 Index: phpdoc/en/reference/mysqli/mysqli/functions/mysqli-escape-string.xml +++ phpdoc/en/reference/mysqli/mysqli/functions/mysqli-escape-string.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.3 Maintainer: baoengb Status: ready --> <refentry id="function.mysqli-escape-string"> <refnamediv> <refname>mysqli-escape-string</refname> <refpurpose>Alias de <function>mysqli_real_escape_string</function></refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <para> Esta funci&oacute;n es un alias de <function>mysqli_real_escape_string</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 --> http://cvs.php.net/co.php/phpdoc/en/reference/mysqli/mysqli/functions/mysqli-execute.xml?r=1.1&p=1 Index: phpdoc/en/reference/mysqli/mysqli/functions/mysqli-execute.xml +++ phpdoc/en/reference/mysqli/mysqli/functions/mysqli-execute.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.13 Maintainer: baoengb Status: ready --> <refentry id="function.mysqli-execute"> <refnamediv> <refname>mysqli_execute</refname> <refpurpose>Alias de <function>mysqli_stmt_execute</function></refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <para> Esta funci&oacute;n es un alias de <function>mysqli_stmt_execute</function>. Para una descipci&oacute; m&aacute;s detallada vea la descripci&oacute;n de <function>mysqli_stmt_execute</function>. </para> <note> <para> <function>mysqli_execute</function> es obsoleta y ser&aacute; removida. </para> </note> </refsect1> <refsect1> <title>Vea tambi&eacute;n</title> <para> <function>mysqli_stmt_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 --> http://cvs.php.net/co.php/phpdoc/en/reference/mysqli/mysqli/functions/mysqli-fetch-array.xml?r=1.1&p=1 Index: phpdoc/en/reference/mysqli/mysqli/functions/mysqli-fetch-array.xml +++ phpdoc/en/reference/mysqli/mysqli/functions/mysqli-fetch-array.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.14 Maintainer: baoengb Status: ready --> <refentry id="function.mysqli-fetch-array"> <refnamediv> <refname>mysqli_fetch_array</refname> <refname>result->fetch_array</refname> <refpurpose>Obtiene una fila como una matriz asociativa, una matriz num&eacute;rica o ambos.</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <para>Estilo por procedimientos:</para> <methodsynopsis> <type>mixto</type><methodname>mysqli_fetch_array</methodname> <methodparam><type>objeto</type><parameter>resultado</parameter></methodparam> <methodparam choice='opt'><type>int</type><parameter>tipo_de_resultado</parameter></methodparam> </methodsynopsis> <para>Estilo orientado a objetos (m&eacute;todo):</para> <classsynopsis> <ooclass><classname>resultado</classname></ooclass> <methodsynopsis> <type>mixto</type> <methodname>fetch_array</methodname> <methodparam choice='opt'><type>int</type><parameter>tipo_de_resultado</parameter></methodparam> </methodsynopsis> </classsynopsis> <para> Regresa una matrix que corresponde a las filas obtenidas o &null; si no hay m&aacute;s filas para el resultado, representado por el par&aacute;metro <parameter>resultado</parameter>. </para> <para> <function>mysqli_fetch_array</function> es una versi&oacute;n mejorada de la funci&oacute;n <function>mysqli_fetch_row</function>. Adem&aacute; de almacenar los datos en &iacute;ndices num&eacute;ricos de la matriz resultante, la funci&oacute;n <function>mysql_fetch_array</function> tambi&eacute;n puede almacenar los datos en &iacute;ndices asociativos, usando los nombre de los campos de el resultado como llaves. </para> &database.field-case; <para> Si dos o m&aacute;s columnas de el resultado tienen el mismo nombre, la &uacute;ltima columna tomara precedencia y sobre escribir&aacute; lo primero. Para acceder a varias columnas con el mismo nombre, la forma de &iacute;ndice num&eacute;rica debe ser usada. </para> <para> El par&aacute;metro opcional <parameter>tipo_de_resultado</parameter> es una constante que indica qu&eacute; tipo de matriz debe ser producido para la fila de datos actual. Los posibles valires para este par&aacute;metro son las constantes MYSQLI_ASSOC, MYSQLI_NUM, o MYSQLI_BOTH. Por defecto la funci&oacute;n <function>mysqli_fetch_array</function> asumir&aacute; el valor de MYSQLI_BOTH. </para> <para> Al usar la constante MYSQLI_ASSOC, esta funci&oacute;n se comportar&aacute; identica a la funci&oacute;n <function>mysqli_fetch_assoc</function>, mientras que con MYSQLI_NUM se comportar&aacute; identica a la funci&oacute;n <function>mysql_fetch_row</function>. La opci&oacute;n final MYSQLI_BOTH crear&aacute; una matriz con los atributos de ambos. </para> </refsect1> <refsect1> <title>Valores regresados</title> <para> Regresa una matriz que corresponde a las filas obtenidas o &null; si no hay m&aacute;s filas en el resultado. </para> </refsect1> <refsect1> <title>Vea tambi&eacute;n</title> <para> <function>mysqli_fetch_assoc</function>, <function>mysqli_fetch_row</function>, <function>mysqli_fetch_object</function>. </para> </refsect1> <refsect1> <title>Ejemplos</title> <example> <title>Estilo orientado a objetos</title> <programlisting role="php"> <![CDATA[ <?php $mysqli = new mysqli("localhost", "my_user", "my_password", "world"); /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } $query = "SELECT Name, CountryCode FROM City ORDER by ID LIMIT 3"; $result = $mysqli->query($query); /* numeric array */ $row = $result->fetch_array(MYSQLI_NUM); printf ("%s (%s)\n", $row[0], $row[1]); /* associative array */ $row = $result->fetch_array(MYSQLI_ASSOC); printf ("%s (%s)\n", $row["Name"], $row["CountryCode"]); /* associative and numeric array */ $row = $result->fetch_array(MYSQLI_BOTH); printf ("%s (%s)\n", $row[0], $row["CountryCode"]); /* free result set */ $result->close(); /* close connection */ $mysqli->close(); ?> ]]> </programlisting> </example> <example> <title>Estilo por procedimientos</title> <programlisting role="php"> <![CDATA[ <?php $link = mysqli_connect("localhost", "my_user", "my_password", "world"); /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } $query = "SELECT Name, CountryCode FROM City ORDER by ID LIMIT 3"; $result = mysqli_query($link, $query); /* numeric array */ $row = mysqli_fetch_array($result, MYSQLI_NUM); printf ("%s (%s)\n", $row[0], $row[1]); /* associative array */ $row = mysqli_fetch_array($result, MYSQLI_ASSOC); printf ("%s (%s)\n", $row["Name"], $row["CountryCode"]); /* associative and numeric array */ $row = mysqli_fetch_array($result, MYSQLI_BOTH); printf ("%s (%s)\n", $row[0], $row["CountryCode"]); /* free result set */ mysqli_free_result($result); /* close connection */ mysqli_close($link); ?> ]]> </programlisting> </example> <para> Los ejemplos anteriores produci&aacute;n la siguiente salida: </para> <screen> <![CDATA[ Kabul (AFG) Qandahar (AFG) Herat (AFG) ]]> </screen> </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/mysqli/mysqli/functions/mysqli-fetch-assoc.xml?r=1.1&p=1 Index: phpdoc/en/reference/mysqli/mysqli/functions/mysqli-fetch-assoc.xml +++ phpdoc/en/reference/mysqli/mysqli/functions/mysqli-fetch-assoc.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.12 Maintainer: baoengb Status: ready --> <refentry id="function.mysqli-fetch-assoc"> <refnamediv> <refname>mysqli_fetch_assoc</refname> <refname>mysqli->fetch_assoc</refname> <refpurpose>Obtiene una fila del resultado como una matriz asociativa</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <para>Estilo por procedimientos:</para> <methodsynopsis> <type>matriz</type><methodname>mysqli_fetch_assoc</methodname> <methodparam><type>objeto</type><parameter>resultado</parameter></methodparam> </methodsynopsis> <para>Estilo orientado a objetos (m&eacute;todo):</para> <classsynopsis> <ooclass><classname>resultado</classname></ooclass> <methodsynopsis> <type>matriz</type> <methodname>fetch_assoc</methodname> <methodparam><type>void</type><parameter></parameter></methodparam> </methodsynopsis> </classsynopsis> <para> Regresa una matriz asociativa que corresponde a las filas obtenidas o &null; si no hay mas filas. </para> <para> La funci&oacute;n <function>mysqli_fetch_assoc</function> es usada para regresar una representaci&oacute;n asociativa de la siguiente fila en el resultado, representado por el par&aacute;metro <parameter>resultado</parameter>, donde cada llave en la matriz representa el nombre de las columnas en el resultado. </para> <para> Si dos o m&aacute;s columnas de el resultado tienen el mismo nombre, la &uacute;ltima columna tomara precedencia y sobre escribir&aacute; lo primero. Para acceder a varias columnas con el mismo nombre, la forma de &iacute;ndice num&eacute;rica debe ser usada. </para> &database.field-case; </refsect1> <refsect1> <title>Valores regresados</title> <para> Regresa una matriz que corresponde a las filas obtenidas o &null; si no hay m&aacute;s filas en el resultado. </para> </refsect1> <refsect1> <title>Vea tambi&eacute;n</title> <para> <function>mysqli_fetch_array</function>, <function>mysqli_fetch_row</function>, <function>mysqli_fetch_object</function>. </para> </refsect1> <refsect1> <title>Ejemplos</title> <example> <title>Estilo orientado a objetos</title> <programlisting role="php"> <![CDATA[ <?php $mysqli = new mysqli("localhost", "my_user", "my_password", "world"); /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } $query = "SELECT Name, CountryCode FROM City ORDER by ID DESC LIMIT 50,5"; if ($result = $mysqli->query($query)) { /* fetch associative array */ while ($row = $result->fetch_assoc()) { printf ("%s (%s)\n", $row["Name"], $row["CountryCode"]); } /* free result set */ $result->close(); } /* close connection */ $mysqli->close(); ?> ]]> </programlisting> </example> <example> <title>Estilo por procedimientos</title> <programlisting role="php"> <![CDATA[ <?php $link = mysqli_connect("localhost", "my_user", "my_password", "world"); /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } $query = "SELECT Name, CountryCode FROM City ORDER by ID DESC LIMIT 50,5"; if ($result = mysqli_query($link, $query)) { /* fetch associative array */ while ($row = mysqli_fetch_assoc($result)) { printf ("%s (%s)\n", $row["Name"], $row["CountryCode"]); } /* free result set */ mysqli_free_result($result); } /* close connection */ mysqli_close($link); ?> ]]> </programlisting> </example> <para> Los ejemplos anteriores producir&aacute;n la siguiente salida: </para> <screen> <![CDATA[ Pueblo (USA) Arvada (USA) Cape Coral (USA) Green Bay (USA) Santa Clara (USA) ]]> </screen> </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/mysqli/mysqli/functions/mysqli-fetch-field-direct.xml?r=1.1&p=1 Index: phpdoc/en/reference/mysqli/mysqli/functions/mysqli-fetch-field-direct.xml +++ phpdoc/en/reference/mysqli/mysqli/functions/mysqli-fetch-field-direct.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.8 Maintainer: baoengb Status: ready --> <refentry id="function.mysqli-fetch-field-direct"> <refnamediv> <refname>mysqli_fetch_field_direct</refname> <refname>result->fetch_field_direct</refname> <refpurpose> Obtiene los metadatos de un campo </refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <para>Estilo por procedimientos:</para> <methodsynopsis> <type>mixto</type><methodname>mysqli_fetch_field_direct</methodname> <methodparam><type>objeto</type><parameter>resultado</parameter></methodparam> <methodparam><type>int</type><parameter>indice_de_campo</parameter></methodparam> </methodsynopsis> <para>Estilo orientado a objetos (m&eacute;todo):</para> <classsynopsis> <ooclass><classname>resultado</classname></ooclass> <methodsynopsis> <type>mixto</type> <methodname>fetch_field_direct</methodname> <methodparam><type>int</type><parameter>indice_de_campo</parameter></methodparam> </methodsynopsis> </classsynopsis> <para> La funci&oacute;n <function>mysqli_fetch_field_direct</function> regresa un objeto el cu&aacute;l contiene informaci&oacute;n de la definici&oacute;n del campo del resultado espec&iacute;ficado. El valor de indice_de_campo debe estar en el rango de <literal>0</literal> a <literal>n&uacute;mero de campos -1</literal>. </para> </refsect1> <refsect1> <title>Valores regresados</title> <para> Regresa un objeto el cual contiene informaci&oacute;n de la definici&oacute;n del campo o &false; si no hay informaci&oacute;n para el <literal>indice_de_campo</literal> espec&iacute;ficado. </para> <para> <table> <title>Atributos del objeto</title> <tgroup cols='2'> <thead> <row> <entry>Atributo</entry> <entry>Descripci&oacute;n</entry> </row> </thead> <tbody> <row> <entry>name</entry> <entry>Nombre de la columna</entry> </row> <row> <entry>orgname</entry> <entry>Nombre original de la columna si se di&oacute; un alias</entry> </row> <row> <entry>table</entry> <entry>Nombre de la tabla a la que pertenece el campo</entry> </row> <row> <entry>orgtable</entry> <entry>Nombre original de la tabla si se di&oacute; un alias</entry> </row> <row> <entry>def</entry> <entry>El valor por defecto para este campo, representado como una cadena</entry> </row> <row> <entry>max_length</entry> <entry>La amplitud m&aacute;xima de campo de el campo para el resultado</entry> </row> <row> <entry>flags</entry> <entry>Un entero que representa los bit bandera para el campo</entry> </row> <row> <entry>type</entry> <entry>Tipo de dato utilizado para este campo</entry> </row> <row> <entry>decimals</entry> <entry>N&uacute;mero de decimales usadas (para campos entero)</entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1> <title>Vea tambi&eacute;n</title> <para> <function>mysqli_num_fields</function> <function>mysqli_fetch_field</function> <function>mysqli_fetch_fields</function> </para> </refsect1> <refsect1> <title>Ejemplos</title> <example> <title>Estilo orientado a objetos</title> <programlisting role="php"> <![CDATA[ <?php $mysqli = new mysqli("localhost", "my_user", "my_password", "world"); /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } $query = "SELECT Name, SurfaceArea from Country ORDER BY Name LIMIT 5"; if ($result = $mysqli->query($query)) { /* Get field information for column 'SurfaceArea' */ $finfo = $result->fetch_field_direct(1); printf("Name: %s\n", $finfo->name); printf("Table: %s\n", $finfo->table); printf("max. Len: %d\n", $finfo->max_length); printf("Flags: %d\n", $finfo->flags); printf("Type: %d\n", $finfo->type); $result->close(); } /* close connection */ $mysqli->close(); ?> ]]> </programlisting> </example> <example> <title>Estilo por procedimientos</title> <programlisting role="php"> <![CDATA[ <?php $link = mysqli_connect("localhost", "my_user", "my_password", "world"); /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } $query = "SELECT Name, SurfaceArea from Country ORDER BY Name LIMIT 5"; if ($result = mysqli_query($link, $query)) { /* Get field information for column 'SurfaceArea' */ $finfo = mysqli_fetch_field_direct($result, 1); printf("Name: %s\n", $finfo->name); printf("Table: %s\n", $finfo->table); printf("max. Len: %d\n", $finfo->max_length); printf("Flags: %d\n", $finfo->flags); printf("Type: %d\n", $finfo->type); mysqli_free_result($result); } /* close connection */ mysqli_close($link); ?> ]]> </programlisting> </example> <para> Los ejemplos anteriores producir&aacute;n la siguiente salida: </para> <screen> <![CDATA[ Name: SurfaceArea Table: Country max. Len: 10 Flags: 32769 Type: 4 ]]> </screen> </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/mysqli/mysqli/functions/mysqli-fetch-field.xml?r=1.1&p=1 Index: phpdoc/en/reference/mysqli/mysqli/functions/mysqli-fetch-field.xml +++ phpdoc/en/reference/mysqli/mysqli/functions/mysqli-fetch-field.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.12 Maintainer: baoengb Status: ready --> <refentry id="function.mysqli-fetch-field"> <refnamediv> <refname>mysqli_fetch_field</refname> <refname>result->fetch_field</refname> <refpurpose>Regresa metadatos de el campo en el resultado</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <para>Estilo por procedimientos:</para> <methodsynopsis> <type>mixto</type><methodname>mysqli_fetch_field</methodname> <methodparam><type>objeto</type><parameter>resultado</parameter></methodparam> </methodsynopsis> <para>Estilo orientado a objetos (m&eacute;todo):</para> <classsynopsis> <ooclass><classname>resultado</classname></ooclass> <methodsynopsis> <type>mixto</type> <methodname>fetch_field</methodname> <void/> </methodsynopsis> </classsynopsis> <para> La funci&oacute;n <function>mysqli_fetch_field</function> regresa un objeto con informaci&oacute;n de definici&oacute;n de un campo de un resultado. Ejecute esta funci&oacute;n repetidamente para obtener la informaci&oacute;n de todas las columnas en un resultado. <function>mysqli_fetch_field</function> regresa &false; cuando no hay m&aacute;s columnas en el resultado. </para> </refsect1> <refsect1> <title>Valores regresados</title> <para> Regresa un objeto el cual contiene la informaci&oacute;n de la definici&oacute;n del campo o &false; si no hay informaci&oacute;n disponible. </para> <para> <table> <title>Atributos del objeto</title> <tgroup cols='2'> <thead> <row> <entry>Atributo</entry> <entry>Descripci&oacute;n</entry> </row> </thead> <tbody> <row> <entry>name</entry> <entry>El nombre de la columna</entry> </row> <row> <entry>orgname</entry> <entry>Nombre original de la columna, si se espec&iacute;fico un alias</entry> </row> <row> <entry>table</entry> <entry>El nombre de la tablaa la cu&aacute;l pertenece</entry> </row> <row> <entry>orgtable</entry> <entry>Nombre original de la tabla si se espec&iacute;fico un alias</entry> </row> <row> <entry>def</entry> <entry>El valor por defecto de este campo, representado con una cadena</entry> </row> <row> <entry>max_length</entry> <entry>La m&aacute;ma amplitud del campo para el resultado</entry> </row> <row> <entry>flags</entry> <entry>Un entero representando los bit de bandera para el campo</entry> </row> <row> <entry>type</entry> <entry>El tipo de dato usado para este campo</entry> </row> <row> <entry>decimals</entry> <entry>El n&uacute;mero de decimales utilizadas (para campos num&eacute;ricos)</entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1> <title>Vea tambi&eacute;n</title> <para> <function>mysqli_num_fields</function> <function>mysqli_fetch_field_direct</function> <function>mysqli_fetch_fields</function> <function>mysqli_field_seek</function> </para> </refsect1> <refsect1> <title>Ejemplos</title> <example> <title>Estilo orientado a objetos</title> <programlisting role="php"> <![CDATA[ <?php $mysqli = new mysqli("localhost", "my_user", "my_password", "world"); /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } $query = "SELECT Name, SurfaceArea from Country ORDER BY Code LIMIT 5"; if ($result = $mysqli->query($query)) { /* Get field information for all columns */ while ($finfo = $result->fetch_field()) { printf("Name: %s\n", $finfo->name); printf("Table: %s\n", $finfo->table); printf("max. Len: %d\n", $finfo->max_length); printf("Flags: %d\n", $finfo->flags); printf("Type: %d\n\n", $finfo->type); } $result->close(); } /* close connection */ $mysqli->close(); ?> ]]> </programlisting> </example> <example> <title>Estilo por procedimientos</title> <programlisting role="php"> <![CDATA[ <?php $link = mysqli_connect("localhost", "my_user", "my_password", "world"); /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } $query = "SELECT Name, SurfaceArea from Country ORDER BY Code LIMIT 5"; if ($result = mysqli_query($link, $query)) { /* Get field information for all fields */ while ($finfo = mysqli_fetch_field($result)) { printf("Name: %s\n", $finfo->name); printf("Table: %s\n", $finfo->table); printf("max. Len: %d\n", $finfo->max_length); printf("Flags: %d\n", $finfo->flags); printf("Type: %d\n\n", $finfo->type); } mysqli_free_result($result); } /* close connection */ mysqli_close($link); ?> ]]> </programlisting> </example> <para> Los ejemplos anteriores producir&aacute;n la siguiente salida: </para> <screen> <![CDATA[ Name: Name Table: Country max. Len: 11 Flags: 1 Type: 254 Name: SurfaceArea Table: Country max. Len: 10 Flags: 32769 Type: 4 ]]> </screen> </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/mysqli/mysqli/functions/mysqli-fetch-fields.xml?r=1.1&p=1 Index: phpdoc/en/reference/mysqli/mysqli/functions/mysqli-fetch-fields.xml +++ phpdoc/en/reference/mysqli/mysqli/functions/mysqli-fetch-fields.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.12 Maintainer: baoengb Status: ready --> <refentry id="function.mysqli-fetch-fields"> <refnamediv> <refname>mysqli_fetch_fields</refname> <refname>result->fetch_fields</refname> <refpurpose>Regresa una matriz de objetos representando los campos en un resultado</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <para>Estilo por procedimientos:</para> <methodsynopsis> <type>mixto</type><methodname>mysqli_fetch_fields</methodname> <methodparam><type>objeto</type><parameter>resultado</parameter></methodparam> </methodsynopsis> <para>Estilo orientado a objetos (m&eacute;todo):</para> <classsynopsis> <ooclass><classname>resultado</classname></ooclass> <methodsynopsis> <type>mixto</type> <methodname>fetch_fields</methodname> <void/> </methodsynopsis> </classsynopsis> <para> Esta funci&oacute;n sirve identica en prop&oacute;sito a la funci&oacute;n <function>mysqli-fetch-field</function> con la minima diferencia de que, en lugar de regresar un objeto a la vez para cada campo, las columnas son regresadas como una matiz de objetos. Para una descripci&oacute;n de los atributos de cada objeto y su significado vea la funci&oacute;n <function>mysqli_fetch_field</function>. </para> </refsect1> <refsect1> <title>Valores regresados</title> <para> Regresa una matriz de objetos que contienen la informaci&oacute;n de definici&oacute; de los campos o &false; si no hay informaci&oacute;n del campo disponible. </para> </refsect1> <refsect1> <title>Vea tambi&eacute;n</title> <para> <function>mysqli_num_fields</function> <function>mysqli_fetch_field</function> <function>mysqli_fetch_field_direct</function> </para> </refsect1> <refsect1> <title>Ejemplos</title> <example> <title>Estilo orientado a objetos</title> <programlisting role="php"> <![CDATA[ <?php $mysqli = new mysqli("localhost", "my_user", "my_password", "world"); /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } $query = "SELECT Name, SurfaceArea from Country ORDER BY Code LIMIT 5"; if ($result = $mysqli->query($query)) { /* Get field information for all columns */ $finfo = $result->fetch_fields(); for ($i=0; $i < count($finfo); $i++) { printf("Name: %s\n", $finfo[$i]->name); printf("Table: %s\n", $finfo[$i]->table); printf("max. Len: %d\n", $finfo[$i]->max_length); printf("Flags: %d\n", $finfo[$i]->flags); printf("Type: %d\n\n", $finfo[$i]->type); } $result->close(); } /* close connection */ $mysqli->close(); ?> ]]> </programlisting> </example> <example> <title>Estilo por procedimientos</title> <programlisting role="php"> <![CDATA[ <?php $link = mysqli_connect("localhost", "my_user", "my_password", "world"); /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } $query = "SELECT Name, SurfaceArea from Country ORDER BY Code LIMIT 5"; if ($result = mysqli_query($link, $query)) { /* Get field information for all columns */ $finfo = mysqli_fetch_fields($result); for ($i=0; $i < count($finfo); $i++) { printf("Name: %s\n", $finfo[$i]->name); printf("Table: %s\n", $finfo[$i]->table); printf("max. Len: %d\n", $finfo[$i]->max_length); printf("Flags: %d\n", $finfo[$i]->flags); printf("Type: %d\n\n", $finfo[$i]->type); } mysqli_free_result($result); } /* close connection */ mysqli_close($link); ?> ]]> </programlisting> </example> <para> Los ejemplos anteriores producir&aacute;n la siguiente salida: </para> <screen> <![CDATA[ Name: Name Table: Country max. Len: 11 Flags: 1 Type: 254 Name: SurfaceArea Table: Country max. Len: 10 Flags: 32769 Type: 4 ]]> </screen> </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/mysqli/mysqli/functions/mysqli-fetch-lengths.xml?r=1.1&p=1 Index: phpdoc/en/reference/mysqli/mysqli/functions/mysqli-fetch-lengths.xml +++ phpdoc/en/reference/mysqli/mysqli/functions/mysqli-fetch-lengths.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.11 Maintainer: baoengb Status: ready --> <refentry id="function.mysqli-fetch-lengths"> <refnamediv> <refname>mysqli_fetch_lengths</refname> <refname>result->lengths</refname> <refpurpose>Regresa la longitud de las columnas de la fila actual en el resultado</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <para>Estilo por procedimientos:</para> <methodsynopsis> <type>mixto</type><methodname>mysqli_fetch_lengths</methodname> <methodparam><type>objeto</type><parameter>resultado</parameter></methodparam> </methodsynopsis> <para>Estilo orientado a objetos(propiedad):</para> <classsynopsis> <ooclass><classname>resultado</classname></ooclass> <fieldsynopsis><type>mixto</type><varname>lengths</varname></fieldsynopsis> </classsynopsis> <para> La funci&oacute;n <function>mysqli_fetch_lengths</function> regresa una matriz conteniendo la longitud de cada columna de la fila actual en el resultado representado por el par&aacute;metro <parameter>result</parameter>. Si hay informaci&oacute;n regresa una matriz num&eacute;ricamente ordenada representando la longitud de cada columna o &false; si falla. </para> </refsect1> <refsect1> <title>Valores regresados</title> <para> Una matriz de enteros representando el tamaño de cada columna (sin incluir el caracter NULL al final de la columna). &false; si ocurre un error. </para> <para> <function>mysql_fetch_lengths</function>Es valida solo para la fila actual en el resultado. Regresa &false; si se llama antes de ejecutar mysql_fetch_row/array/object o despu&eacute;s de obtener todas las filas en el resultado. </para> </refsect1> <refsect1> <title>Ejemplos</title> <example> <title>Estilo orientado a objetos</title> <programlisting role="php"> <![CDATA[ <?php $mysqli = new mysqli("localhost", "my_user", "my_password", "world"); /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } $query = "SELECT * from Country ORDER BY Code LIMIT 1"; if ($result = $mysqli->query($query)) { $row = $result->fetch_row(); /* display column lengths */ for ($i=0; $i < count($result->lengths); $i++) { printf("Field %2d has Length %2d\n", $i+1, $result->lengths[$i]); } $result->close(); } /* close connection */ $mysqli->close(); ?> ]]> </programlisting> </example> <example> <title>Estilo por procedimientos</title> <programlisting role="php"> <![CDATA[ <?php $link = mysqli_connect("localhost", "my_user", "my_password", "world"); /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } $query = "SELECT * from Country ORDER BY Code LIMIT 1"; if ($result = mysqli_query($link, $query)) { $row = mysqli_fetch_row($result); /* display column lengths */ $lengths = mysqli_fetch_lengths($result); for ($i=0; $i < count($lengths); $i++) { printf("Field %2d has Length %2d\n", $i+1, $lengths[$i]); } mysqli_free_result($result); } /* close connection */ mysqli_close($link); ?> ]]> </programlisting> </example> <para> Los ejemplos anteriores producir&aacute;n la siguiente salida: </para> <screen> <![CDATA[ Field 1 has Length 3 Field 2 has Length 5 Field 3 has Length 13 Field 4 has Length 9 Field 5 has Length 6 Field 6 has Length 1 Field 7 has Length 6 Field 8 has Length 4 Field 9 has Length 6 Field 10 has Length 6 Field 11 has Length 5 Field 12 has Length 44 Field 13 has Length 7 Field 14 has Length 3 Field 15 has Length 2 ]]> </screen> </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 --> http://cvs.php.net/co.php/phpdoc/en/reference/mysqli/mysqli/functions/mysqli-fetch.xml?r=1.1&p=1 Index: phpdoc/en/reference/mysqli/mysqli/functions/mysqli-fetch.xml +++ phpdoc/en/reference/mysqli/mysqli/functions/mysqli-fetch.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.9 Maintainer: baoengb Status: ready --> <refentry id="function.mysqli-fetch"> <refnamediv> <refname>mysqli_fetch</refname> <refpurpose>Alias de <function>mysqli_stmt_fetch</function></refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <para> Esta funci&oacute;n es un alias de <function>mysqli_stmt_fetch</function>. Para una descripci&oacute;n m&aacute;s detallada vea <function>mysqli_stmt_fetch</function>. </para> <note> <para> <function>mysqli_fetch</function> es obsoleta y ser&aacute; removida. </para> </note> </refsect1> <refsect1> <title>Vea tambi&eacute;n</title> <para> <function>mysqli_stmt_fetch</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 -->
« previous php.doc (#969359602) next »