cvs: phpdoc-es / translation.xml /reference/mysqli/functions mysqli-query.xml mysqli-real-connect.xml mysqli-real-escape-string.xml
mysqli-real-query.xml mysqli-report.xml mysqli-rollback.xml mysqli-rpl-parse-enabled.xml mysqli-rpl-probe.xml mysqli-rpl-query-type.xml

From: Date: Thu, 29 Apr 2004 15:00:17 +0000
Subject: cvs: phpdoc-es / translation.xml /reference/mysqli/functions mysqli-query.xml mysqli-real-connect.xml mysqli-real-escape-string.xml
mysqli-real-query.xml mysqli-report.xml mysqli-rollback.xml mysqli-rpl-parse-enabled.xml mysqli-rpl-probe.xml mysqli-rpl-query-type.xml
Groups: php.doc.es 
Request: Send a blank email to doc-es+get-577@lists.php.net to get a copy of this message
baoengb Thu Apr 29 11:00:17 2004 EDT Added files: /phpdoc-es/reference/mysqli/functions mysqli-query.xml mysqli-real-connect.xml mysqli-real-escape-string.xml mysqli-real-query.xml mysqli-report.xml mysqli-rollback.xml mysqli-rpl-parse-enabled.xml mysqli-rpl-probe.xml mysqli-rpl-query-type.xml Modified files: /phpdoc-es translation.xml Log: Agregando a la traduccion al espanyol

http://cvs.php.net/diff.php/phpdoc-es/translation.xml?r1=1.144&r2=1.145&ty=u Index: phpdoc-es/translation.xml diff -u phpdoc-es/translation.xml:1.144 phpdoc-es/translation.xml:1.145 --- phpdoc-es/translation.xml:1.144 Mon Apr 26 13:38:20 2004 +++ phpdoc-es/translation.xml Thu Apr 29 11:00:16 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.144 $ --> +<!-- $Revision: 1.145 $ --> <!DOCTYPE translation SYSTEM "../entities/translation.dtd"> <translation> @@ -148,33 +148,6 @@ <file name="reference/pdf/pdf-attach-file.xml" person="jtacon" type="translation" date="29.01.2004"/> - <file name="reference/mysqli/functions/mysqli-query.xml" person="baoengb" - type="translation" date="02.03.2004"/> - - <file name="reference/mysqli/functions/mysqli-real-connect.xml" person="baoengb" - type="translation" date="02.03.2004"/> - - <file name="reference/mysqli/functions/mysqli-real-escape-string.xml" person="baoengb" - type="translation" date="02.03.2004"/> - - <file name="reference/mysqli/functions/mysqli-real-query.xml" person="baoengb" - type="translation" date="02.03.2004"/> - - <file name="reference/mysqli/functions/mysqli-report.xml" person="baoengb" - type="translation" date="02.03.2004"/> - - <file name="reference/mysqli/functions/mysqli-rollback.xml" person="baoengb" - type="translation" date="02.03.2004"/> - - <file name="reference/mysqli/functions/mysqli-rpl-parse-enabled.xml" person="baoengb" - type="translation" date="02.03.2004"/> - - <file name="reference/mysqli/functions/mysqli-rpl-probe.xml" person="baoengb" - type="translation" date="02.03.2004"/> - - <file name="reference/mysqli/functions/mysqli-rpl-query-type.xml" person="baoengb" - type="translation" date="02.03.2004"/> - <file name="reference/mysqli/functions/mysqli-select-db.xml" person="baoengb" type="translation" date="02.03.2004"/> http://cvs.php.net/co.php/phpdoc-es/reference/mysqli/functions/mysqli-query.xml?r=1.1&p=1 Index: phpdoc-es/reference/mysqli/functions/mysqli-query.xml +++ phpdoc-es/reference/mysqli/functions/mysqli-query.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.6 Maintainer: baoengb Status: ready --> <refentry id="function.mysqli-query"> <refnamediv> <refname>mysqli_query</refname> <refname>mysqli->query</refname> <refpurpose>Ejecuta una consulta en la base de datos</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <para>Estilo por procedimientos:</para> <methodsynopsis> <type>mixto</type><methodname>mysqli_query</methodname> <methodparam><type>objeto</type><parameter>identificador_de_enlace</parameter></methodparam> <methodparam><type>cadena</type><parameter>consulta</parameter></methodparam> <methodparam choice='opt'><type>int</type><parameter>resultmode</parameter></methodparam> </methodsynopsis> <para>Estilo orientado a objetos (m&eacute;todo):</para> <classsynopsis> <ooclass><classname>mysqli</classname></ooclass> <methodsynopsis> <type>mixto</type> <methodname>query</methodname> <methodparam><type>cadena</type><parameter>consulta</parameter></methodparam> </methodsynopsis> </classsynopsis> <para> La funci&oacute; <function>mysqli_query</function> es usada para simplificar la acci&oacute;n de ejecutar una consulta sobre la base de datos representada por el par&aacute;metro <parameter>identificador_de_enlace</parameter>. </para> <para> Funcionalmente, usar est&aacute; funci&oacute;n es identifo a llamar <function>mysqli_real_query</function> seguida ya sea de <function>mysqli_use_result</function> o <function>mysqli_store_result</function> donde <parameter>consulta</parameter> es la cadena de la consulta y <parameter>resultmode</parameter> es una de las constantes <literal>MYSQLI_USE_RESULT</literal> o <literal>MYSQLI_STORE_RESULT</literal> dependiendo del comportamiento deseado. Por defecto, si no se da <parameter>resultmode</parameter>, <literal>MYSQLI_STORE_RESULT</literal> es usado. </para> <para> Si usted ejecuta <function>mysqli_query</function> con <parameter>resultmode</parameter> <literal>MYSQLI_USE_RESULT</literal> todas las llamadas subsecuentes regresar&aacute;n el c&oacute;digo de error <literal>Commands out of sync</literal> a menos que llame <function>mysqli_free_result</function>. </para> </refsect1> <refsect1> <title>Valores regresados</title> <para> &return.success; Para <literal>SELECT, SHOW, DESCRIBE</literal> o <literal>EXPLAIN</literal> <function>mysqli_query</function> regresar&aacute; un objeto resultante. </para> </refsect1> <refsect1> <title>Vea tambi&eacute;n</title> <para> <function>mysqli_real_query</function>, <function>mysqli_multi_query</function>, <function>mysqli_free_result</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(); } /* Create table doesn't return a resultset */ if ($mysqli->query("CREATE TEMPORARY TABLE myCity LIKE City") === TRUE) { printf("Table myCity successfully created.\n"); } /* Select queries return a resultset */ if ($result = $mysqli->query("SELECT Name FROM City LIMIT 10")) { printf("Select returned %d rows.\n", $result->num_rows); /* free result set */ $result->close(); } /* If we have to retrieve large amount of data we use MYSQLI_USE_RESULT */ if ($result = $mysqli->query("SELECT * FROM City", MYSQLI_USE_RESULT)) { /* Note, that we can't execute any functions which interact with the server until result set was closed. All calls will return an 'out of sync' error */ if (!$mysqli->query("SET @a:='this will not work'")) { printf("Error: %s\n", $mysqli->error); } $result->close(); } $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(); } /* Create table doesn't return a resultset */ if (mysqli_query($link, "CREATE TEMPORARY TABLE myCity LIKE City") === TRUE) { printf("Table myCity successfully created.\n"); } /* Select queries return a resultset */ if ($result = mysqli_query($link, "SELECT Name FROM City LIMIT 10")) { printf("Select returned %d rows.\n", mysqli_num_rows($result)); /* free result set */ mysqli_free_result($result); } /* If we have to retrieve large amount of data we use MYSQLI_USE_RESULT */ if ($result = mysqli_query($link, "SELECT * FROM City", MYSQLI_USE_RESULT)) { /* Note, that we can't execute any functions which interact with the server until result set was closed. All calls will return an 'out of sync' error */ if (!mysqli_query($link, "SET @a:='this will not work'")) { printf("Error: %s\n", mysqli_error($link)); } mysqli_free_result($result); } mysqli_close($link); ?> ]]> </programlisting> </example> <para> Los ejemplos anteriores producir&aacute;n la siguiente salida: </para> <screen> <![CDATA[ Table myCity successfully created. Select returned 10 rows. Error: Commands out of sync; You can't run this command now ]]> </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-es/reference/mysqli/functions/mysqli-real-connect.xml?r=1.1&p=1 Index: phpdoc-es/reference/mysqli/functions/mysqli-real-connect.xml +++ phpdoc-es/reference/mysqli/functions/mysqli-real-connect.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.6 Maintainer: baoengb Status: ready --> <refentry id="function.mysqli-real-connect"> <refnamediv> <refname>mysqli_real_connect</refname> <refname>mysqli->real_connect</refname> <refpurpose>Abre una conexi&oacute;n a un servidor de MySQL</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <para>Estilo por procedimientos</para> <methodsynopsis> <type>bool</type><methodname>mysqli_real_connect</methodname> <methodparam><type>objeto</type><parameter>link</parameter></methodparam> <methodparam choice='opt'><type>cadena</type><parameter>equipo_hu&eacute;sped</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>nombre_de_bd</parameter></methodparam> <methodparam choice='opt'><type>int</type><parameter>puerto</parameter></methodparam> <methodparam choice='opt'><type>cadena</type><parameter>socket</parameter></methodparam> <methodparam choice='opt'><type>int</type><parameter>banderas</parameter></methodparam> </methodsynopsis> <para>Estilo orientado a objetos (m&eacute;todo)</para> <classsynopsis> <ooclass><classname>mysqli</classname></ooclass> <methodsynopsis> <type>bool</type> <methodname>real_connect</methodname> <methodparam choice='opt'><type>cadena</type><parameter>equipo_hu&eacute;sped</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>nombre_de_bd</parameter></methodparam> <methodparam choice='opt'><type>int</type><parameter>puerto</parameter></methodparam> <methodparam choice='opt'><type>cadena</type><parameter>socket</parameter></methodparam> <methodparam choice='opt'><type>int</type><parameter>banderas</parameter></methodparam> </methodsynopsis> </classsynopsis> <para> mysql_real_connect() Intenta establecer una conexi&oacute;n con un equipo que tiene ejecutando un servidor de MySQL. </para> <para> Esta funci&oacute;n es diferente de <function>mysqli_connect</function> en lo siguiente: </para> <itemizedlist> <listitem> <para> <function>mysqli_real_connect</function> necesita un objeto valido el cual tiene que ser creado por la funci&oacute;n <function>mysqli_init</function> </para> </listitem> <listitem> <para> Con la funci&oacute;n <function>mysqli_options</function> tu puedes fijar varias opciones por conexi&oacute;n. </para> </listitem> <listitem> <para> Con el par&aacute;metro <parameter>banderas</parameter> tu puedes fijar diferentes opciones de la conexi&oacute;n: </para> <table> <title>Banderas soportadas</title> <tgroup cols='2'> <thead> <row> <entry>Nombre</entry> <entry>Descripci&oacute;n</entry> </row> </thead> <tbody> <row> <entry><literal>MYSQLI_CLIENT_COMPRESS</literal></entry> <entry>Usa el protocolo de compresi&oacute;n</entry> </row> <row> <entry><literal>MYSQLI_CLIENT_FOUND_ROWS</literal></entry> <entry>Regresa el n&uacute;mero de filas encontradas, no el n&uacute;mero de filas afectadas</entry> </row> <row> <entry><literal>MYSQLI_CLIENT_IGNORE_SPACE</literal></entry> <entry>Permite espacios despues de los nombres de las funciones. Hace palabras reservadas los nombres de las funciones.</entry> </row> <row> <entry><literal>MYSQLI_CLIENT_INTERACTIVE</literal></entry> <entry> Permite los segundos <literal>interactive_timeout</literal> (en vez de <literal>wait_timeout</literal>) de inactividad antes de cerrar la conexi&oacute;n </entry> </row> <row> <entry><literal>MYSQLI_CLIENT_SSL</literal></entry> <entry>Usa SSL (encriptaci&oacute;n)</entry> </row> </tbody> </tgroup> </table> <note> <para> Por razones de seguridad la bandera <literal>MULTI_STATEMENT</literal> no es permitida en PHP. Si quiere ejecutar consultas m&uacute;ltiples use la funci&oacute;n <function>mysqli_multi_query</function>. </para> </note> </listitem> </itemizedlist> </refsect1> <refsect1> &reftitle.returnvalues; <para>&return.success;</para> </refsect1> <refsect1> &reftitle.seealso; <para> <function>mysqli_connect</function>, <function>mysqli_init</function>, <function>mysqli_options</function>, <function>mysqli_ssl_set</function>, <function>mysqli_close</function>. </para> </refsect1> <refsect1> <title>Ejemplos</title> <example> <title>Estilo orientado a objetos</title> <programlisting role="php"> <![CDATA[ <?php /* create a connection object which is not connected */ $mysqli = mysqli_init(); /* set connection options */ $mysqli->options(MYSQLI_INIT_COMMAND, "SET AUTOCOMMIT=0"); $mysqli->options(MYSQLI_OPT_CONNECT_TIMEOUT, 5); /* connect to server */ $mysqli->real_connect('localhost', 'my_user', 'my_password', 'world'); /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } printf ("Connection: %s\n.", $mysqli->host_info); $mysqli->close(); ?> ]]> </programlisting> </example> <example> <title>Estilo por procedimientos</title> <programlisting role="php"> <![CDATA[ <?php /* create a connection object which is not connected */ $link = mysqli_init(); /* set connection options */ mysqli_options($link, MYSQLI_INIT_COMMAND, "SET AUTOCOMMIT=0"); mysqli_options($link, MYSQLI_OPT_CONNECT_TIMEOUT, 5); /* connect to server */ mysqli_real_connect($link, 'localhost', 'my_user', 'my_password', 'world'); /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } printf ("Connection: %s\n.", mysqli_get_host_info($link)); mysqli_close($link); ?> ]]> </programlisting> </example> <para> Los ejemplos anteriores producir&aacute;n la siguiente salida: </para> <screen> <![CDATA[ Connection: 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-es/reference/mysqli/functions/mysqli-real-escape-string.xml?r=1.1&p=1 Index: phpdoc-es/reference/mysqli/functions/mysqli-real-escape-string.xml +++ phpdoc-es/reference/mysqli/functions/mysqli-real-escape-string.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.7 Maintainer:baoengb Status: ready --> <refentry id="function.mysqli-real-escape-string"> <refnamediv> <refname>mysqli_real_escape_string</refname> <refname>mysqli->real_escape_string</refname> <refpurpose> Protege caracteres especiales en una cadena para ser usada en una sentencia SQL, tomando en cuenta el conjunto de caracteres para la conexi&oacute;n </refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <para>Estilo por procedimientos:</para> <methodsynopsis> <type>cadena</type><methodname>mysqli_real_escape_string</methodname> <methodparam><type>objeto</type><parameter>identificador_de_enlace</parameter></methodparam> <methodparam><type>cadena</type><parameter>escapestr</parameter></methodparam> </methodsynopsis> <para>Estilo orientado a objetos (m&eacute;todo):</para> <classsynopsis> <ooclass><classname>mysqli</classname></ooclass> <methodsynopsis> <type>cadena</type> <methodname>real_escape_sring</methodname> <methodparam><type>cadena</type><parameter>escapestr</parameter></methodparam> </methodsynopsis> </classsynopsis> <para> Esta funci&oacute;n es usada para crear una cadena SQL legal que se puede usar en una sentencia SQL. La cadena <literal>escapestr</literal> est&aacute; codificada para una cadena SQL protegida, tomando en cuenta el conjunto de caracteres actual para la conexi&oacute;n. </para> <para> Los caracteres codificados son <literal>NUL (ASCII 0), \n, \r, \, ', ", y Control-Z</literal>. </para> </refsect1> <refsect1> <title>Valores regresados</title> <para> Regresa una cadena protegida. </para> </refsect1> <refsect1> <title>Vea tambi&eacute;n</title> <para> <function>mysqli_character_set_name</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(); } $mysqli->query("CREATE TEMPORARY TABLE myCity LIKE City"); $city = "'s Hertogenbosch"; /* this query will fail, cause we didn't escape $city */ if (!$mysqli->query("INSERT into myCity (Name) VALUES ('$city')")) { printf("Error: %s\n", $mysqli->sqlstate); } $city = $mysqli->real_escape_string($city); /* this query with escaped $city will work */ if ($mysqli->query("INSERT into myCity (Name) VALUES ('$city')")) { printf("%d Row inserted.\n", $mysqli->affected_rows); } $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(); } mysqli_query($link, "CREATE TEMPORARY TABLE myCity LIKE City"); $city = "'s Hertogenbosch"; /* this query will fail, cause we didn't escape $city */ if (!mysqli_query($link, "INSERT into myCity (Name) VALUES ('$city')")) { printf("Error: %s\n", mysqli_sqlstate($link)); } $city = mysqli_real_escape_string($link, $city); /* this query with escaped $city will work */ if (mysqli_query($link, "INSERT into myCity (Name) VALUES ('$city')")) { printf("%d Row inserted.\n", mysqli_affected_rows($link)); } mysqli_close($link); ?> ]]> </programlisting> </example> <para> Los ejemplos anteriores producir&aacute;n la siguiente salida: </para> <screen> <![CDATA[ Error: 42000 1 Row inserted. ]]> </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-es/reference/mysqli/functions/mysqli-real-query.xml?r=1.1&p=1 Index: phpdoc-es/reference/mysqli/functions/mysqli-real-query.xml +++ phpdoc-es/reference/mysqli/functions/mysqli-real-query.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.5 Maintainer: baoengb Status: ready --> <refentry id="function.mysqli-real-query"> <refnamediv> <refname>mysqli_real_query</refname> <refname>mysqli->real_query</refname> <refpurpose>Ejecuta una consulta SQL</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <para>Estilo por procedimientos</para> <methodsynopsis> <type>bool</type><methodname>mysqli_real_query</methodname> <methodparam><type>objeto</type><parameter>identificador_de_enlace</parameter></methodparam> <methodparam><type>cadena</type><parameter>consulta</parameter></methodparam> </methodsynopsis> <para>Estilo orientado a objetos (m&eacute;todo):</para> <classsynopsis> <ooclass><classname>mysqli</classname></ooclass> <methodsynopsis> <type>bool</type> <methodname>real_query</methodname> <methodparam><type>cadena</type><parameter>consulta</parameter></methodparam> </methodsynopsis> </classsynopsis> <para> La funci&Oacute;n <function>mysqli_real_query</function> es usada para ejecutar solo una consulta sobre la base de datos representada por <parameter>identificador_de_enlace</parameter> cuyo resultado puede ser obtenido o almacenado usando las funciones <function>mysqli_store_result</function> o <function>mysqli_use_result</function>. </para> <note> <para> Para determinar si una consulta data debe regresar un resultado o no, vea <function>mysqli_field_count</function>. </para> </note> </refsect1> <refsect1> <title>Valores regresados</title> <para> &return.success; </para> </refsect1> <refsect1> <title>Vea tambi&eacute;n</title> <para> <function>mysqli_query</function> <function>mysqli_store_result</function> <function>mysqli_use_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-es/reference/mysqli/functions/mysqli-report.xml?r=1.1&p=1 Index: phpdoc-es/reference/mysqli/functions/mysqli-report.xml +++ phpdoc-es/reference/mysqli/functions/mysqli-report.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.4 Maintainer: baoengb Status: ready --> <refentry id="function.mysqli-report"> <refnamediv> <refname>mysqli_report</refname> <refpurpose>Habilita o deshabilita las funciones internas de reporte</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> <type>bool</type><methodname>mysqli_report</methodname> <methodparam><type>int</type><parameter>banderas</parameter></methodparam> </methodsynopsis> <para> <function>mysqli_report</function> es una poderosa funci&oacute;n para mejorar tus consultas y c&oacute;digo durante las etapas de desarrollo y prueba. Dependiendo de las banderas reporta errores de las llamadas a las funciones o las consultas que no usan un &iacute;ndice (o usa un mal &iacute;ndice). </para> <table> <title>Banderas permitidas</title> <tgroup cols='2'> <thead> <row> <entry>Nombre</entry> <entry>Descripci&oacute;n</entry> </row> </thead> <tbody> <row> <entry><literal>MYSQLI_REPORT_OFF</literal></entry> <entry>Deshabilita el reporteado</entry> </row> <row> <entry><literal>MYSQLI_REPORT_ERROR</literal></entry> <entry>Reporta errores de las llamadas a cualquier funci&oacute;n</entry> </row> <row> <entry><literal>MYSQLI_REPORT_INDEX</literal></entry> <entry>Reporta si no se usa &iacute;ndice o si se us&oacute; un &iacute;ndice mal construido en una consulta</entry> </row> <row> <entry><literal>MYSQLI_REPORT_ALL</literal></entry> <entry>Fija todas las opciones (reporta todo)</entry> </row> </tbody> </tgroup> </table> </refsect1> <refsect1> <title>Valores regresados</title> <para>&return.success;</para> </refsect1> <refsect1> <title>Vea tambi&eacute;n</title> <para> <function>mysqli_debug</function>, <function>mysqli_dump_debug_info</function> </para> </refsect1> <refsect1> <title>Ejemplo</title> <para> <example> <title>Estilo orientado a objetos</title> <programlisting role="php"> <![CDATA[ <?php /* activate reporting */ mysqli_report(MYSQLI_REPORT_ALL); $mysqli = new mysqli("localhost", "my_user", "my_password", "world"); /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } /* this query should report an error */ $result = $mysqli->query("SELECT Name FROM Nonexistingtable WHERE population > 50000"); /* this query should report a warning */ $result = $mysqli->query("SELECT Name FROM City WHERE population > 50000"); $result->close(); $mysqli->close(); ?> ]]> </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 --> http://cvs.php.net/co.php/phpdoc-es/reference/mysqli/functions/mysqli-rollback.xml?r=1.1&p=1 Index: phpdoc-es/reference/mysqli/functions/mysqli-rollback.xml +++ phpdoc-es/reference/mysqli/functions/mysqli-rollback.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.6 Maintainer: baoengb Status: ready --> <refentry id="function.mysqli-rollback"> <refnamediv> <refname>mysqli_rollback</refname> <refname>mysqli->rollback</refname> <refpurpose>Regresa/deshace la transacci&oacute;n actual</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> <type>bool</type><methodname>mysqli_rollback</methodname> <methodparam><type>objeto</type><parameter>identificador_de_enlace</parameter></methodparam> </methodsynopsis> <classsynopsis> <ooclass><classname>mysqli</classname></ooclass> <methodsynopsis> <type>bool</type> <methodname>rollback</methodname> <void/> </methodsynopsis> </classsynopsis> <para> Regresa o deshace la transacci&oacute;n actual pra la base de datos 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_commit</function> <function>mysqli_autocommit</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(); } /* disable autocommit */ $mysqli->autocommit(FALSE); $mysqli->query("CREATE TABLE myCity LIKE City"); $mysqli->query("ALTER TABLE myCity Type=InnoDB"); $mysqli->query("INSERT INTO myCity SELECT * FROM City LIMIT 50"); /* commit insert */ $mysqli->commit(); /* delete all rows */ $mysqli->query("DELETE FROM myCity"); if ($result = $mysqli->query("SELECT COUNT(*) FROM myCity")) { $row = $result->fetch_row(); printf("%d rows in table myCity.\n", $row[0]); /* Free result */ $result->close(); } /* Rollback */ $mysqli->rollback(); if ($result = $mysqli->query("SELECT COUNT(*) FROM myCity")) { $row = $result->fetch_row(); printf("%d rows in table myCity (after rollback).\n", $row[0]); /* Free result */ $result->close(); } /* Drop table myCity */ $mysqli->query("DROP TABLE myCity"); $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(); } /* disable autocommit */ mysqli_autocommit($link, FALSE); mysqli_query($link, "CREATE TABLE myCity LIKE City"); mysqli_query($link, "ALTER TABLE myCity Type=InnoDB"); mysqli_query($link, "INSERT INTO myCity SELECT * FROM City LIMIT 50"); /* commit insert */ mysqli_commit($link); /* delete all rows */ mysqli_query($link, "DELETE FROM myCity"); if ($result = mysqli_query($link, "SELECT COUNT(*) FROM myCity")) { $row = mysqli_fetch_row($result); printf("%d rows in table myCity.\n", $row[0]); /* Free result */ mysqli_free_result($result); } /* Rollback */ mysqli_rollback($link); if ($result = mysqli_query($link, "SELECT COUNT(*) FROM myCity")) { $row = mysqli_fetch_row($result); printf("%d rows in table myCity (after rollback).\n", $row[0]); /* Free result */ mysqli_free_result($result); } /* Drop table myCity */ mysqli_query($link, "DROP TABLE myCity"); mysqli_close($link); ?> ]]> </programlisting> </example> <para> Los ejemplos anteriores producir&aacute;n la siguiente salida: </para> <screen> <![CDATA[ 0 rows in table myCity. 50 rows in table myCity (after rollback). ]]> </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-es/reference/mysqli/functions/mysqli-rpl-parse-enabled.xml?r=1.1&p=1 Index: phpdoc-es/reference/mysqli/functions/mysqli-rpl-parse-enabled.xml +++ phpdoc-es/reference/mysqli/functions/mysqli-rpl-parse-enabled.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.5 Maintainer: baoengb Status: ready --> <refentry id="function.mysqli-rpl-parse-enabled"> <refnamediv> <refname>mysqli_rpl_parse_enabled</refname> <refpurpose></refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> <type>int</type><methodname>mysqli_rpl_parse_enabled</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-es/reference/mysqli/functions/mysqli-rpl-probe.xml?r=1.1&p=1 Index: phpdoc-es/reference/mysqli/functions/mysqli-rpl-probe.xml +++ phpdoc-es/reference/mysqli/functions/mysqli-rpl-probe.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.5 Maintainer: baoengb Status: ready --> <refentry id="function.mysqli-rpl-probe"> <refnamediv> <refname>mysqli_rpl_probe</refname> <refpurpose></refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> <type>bool</type><methodname>mysqli_rpl_probe</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-es/reference/mysqli/functions/mysqli-rpl-query-type.xml?r=1.1&p=1 Index: phpdoc-es/reference/mysqli/functions/mysqli-rpl-query-type.xml +++ phpdoc-es/reference/mysqli/functions/mysqli-rpl-query-type.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.5 Maintainer: baoengb Status: ready --> <refentry id="function.mysqli-rpl-query-type"> <refnamediv> <refname>mysqli_rpl_query_type</refname> <refpurpose></refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> <type>int</type><methodname>mysqli_rpl_query_type</methodname> <methodparam><type>cadena</type><parameter>consulta</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 -->
« previous php.doc.es (#577) next »