cvs: phpdoc-es / translation.xml /reference/mysql/functions mysql-fetch-assoc.xml mysql-get-client-info.xml mysql-get-host-info.xml /security
index.xml
| From: | Leonardo Boshell | Date: | Thu, 02 Oct 2003 07:13:01 +0000 |
| Subject: | cvs: phpdoc-es / translation.xml /reference/mysql/functions mysql-fetch-assoc.xml mysql-get-client-info.xml mysql-get-host-info.xml /security index.xml |
||
| Groups: | php.doc.es | ||
| Request: | Send a blank email to doc-es+get-335@lists.php.net to get a copy of this message | ||
lboshell Thu Oct 2 03:13:01 2003 EDT
Added files:
/phpdoc-es/reference/mysql/functions mysql-fetch-assoc.xml
mysql-get-client-info.xml
mysql-get-host-info.xml
Modified files:
/phpdoc-es translation.xml
/phpdoc-es/security index.xml
Log:
Tres nuevos archivos de la referencia MySQL. Actualizado security/index.xml (sin cambios ya que no
fueron necesarios)
Index: phpdoc-es/translation.xml diff -u phpdoc-es/translation.xml:1.62 phpdoc-es/translation.xml:1.63 --- phpdoc-es/translation.xml:1.62 Mon Sep 29 21:15:32 2003 +++ phpdoc-es/translation.xml Thu Oct 2 03:12:58 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.62 $ --> +<!-- $Revision: 1.63 $ --> <!DOCTYPE translation SYSTEM "../entities/translation.dtd"> <translation> @@ -32,9 +32,6 @@ <file name="faq/databases.xml" person="webstudio" type="translation" date="11.05.2003"/> <file name="faq/general.xml" person="webstudio" type="translation" date="11.05.2003"/> <file name="faq/html.xml" person="webstudio" type="translation" date="11.05.2003"/> -<file name="reference/mysql/functions/mysql-fetch-assoc.xml" person="lboshell" type="translation" date="14.09.2003"/> -<file name="reference/mysql/functions/mysql-get-client-info.xml" person="lboshell" type="translation" date="14.09.2003"/> -<file name="reference/mysql/functions/mysql-get-host-info.xml" person="lboshell" type="translation" date="14.09.2003"/> <file name="reference/mysql/functions/mysql-get-proto-info.xml" person="lboshell" type="translation" date="14.09.2003"/> <file name="reference/mysql/functions/mysql-get-server-info.xml" person="lboshell" type="translation" date="14.09.2003"/> <file name="reference/mysql/functions/mysql-info.xml" person="lboshell" type="translation" date="14.09.2003"/> Index: phpdoc-es/security/index.xml diff -u phpdoc-es/security/index.xml:1.2 phpdoc-es/security/index.xml:1.3 --- phpdoc-es/security/index.xml:1.2 Tue Sep 16 13:59:03 2003 +++ phpdoc-es/security/index.xml Thu Oct 2 03:13:00 2003 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> -<!-- EN-Revision: 1.61 Maintainer: lboshell Status: ready --> +<!-- $Revision: 1.3 $ --> +<!-- EN-Revision: 1.62 Maintainer: lboshell Status: ready --> <chapter id="security.index"> <title>Seguridad</title> Index: phpdoc-es/reference/mysql/functions/mysql-fetch-assoc.xml +++ phpdoc-es/reference/mysql/functions/mysql-fetch-assoc.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.8 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/mysql.xml, last change in rev 1.45 --> <refentry id="function.mysql-fetch-assoc"> <refnamediv> <refname>mysql_fetch_assoc</refname> <refpurpose> Recupera una fila de resultado como una matriz asociativa </refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>array</type><methodname>mysql_fetch_assoc</methodname> <methodparam><type>resource</type><parameter>resultado</parameter></methodparam> </methodsynopsis> <para> Devuelve una matriz asociativa que corresponde a la fila recuperada, o &false; si no hay más filas. </para> <para> <function>mysql_fetch_assoc</function> es equivalente a llamar <function>mysql_fetch_array</function> con MYSQL_ASSOC como segundo parámetro opcional. Únicamente devuelve una matriz asociativa. Esta es la forma en que originalmente trabajaba <function>mysql_fetch_array</function>. Si necesita índices numéricos así como asociativos, utilice <function>mysql_fetch_array</function>. </para> <para> Si dos o más columnas del resultado tienen los mismos nombres de campo, la última columna tomará precedencia. Para acceder a otras columnas con el mismo nombre, tendrá que acceder al resultado con índices numéricos mediante el uso de <function>mysql_fetch_row</function> o agregar sobrenombres. Vea el ejemplo en la descripción de <function>mysql_fetch_array</function> respecto a los sobrenombres. </para> <para> Algo importante a notar es que el uso de <function>mysql_fetch_assoc</function> <emphasis>no es significativamente</emphasis> más lento que el uso de <function>mysql_fetch_row</function>, al mismo tiempo que provee un valor agregado considerable. </para> &database.field-case; <para> <example> <title>Un ejemplo extendido de <function>mysql_fetch_assoc</function></title> <programlisting role="php"> <![CDATA[ <?php $conexion = mysql_connect("localhost", "mysql_user", "mysql_password"); if (!$conexion) { echo "No pudo conectarse a la BD: " . mysql_error(); exit; } if (!mysql_select_db("nombre_de_la_bd")) { echo "No ha sido posible seleccionar la BD: " . mysql_error(); exit; } $sql = "SELECT id as id_usuario, nombre_completo, status_usuario FROM alguna_tabla WHERE status_usuario = 1"; $resultado = mysql_query($sql); if (!$resultado) { echo "No pudo ejecutarse satisfactoriamente la consulta ($sql) " . "en la DB: " . mysql_error(); exit; } if (mysql_num_rows($resultado) == 0) { echo "No se han encontrado filas, nada a imprimir, asi que voy " . "a detenerme."; exit; } // Mientras exista una fila de datos, colocar esa fila en $fila // como una matriz asociativa // Nota: Si solo espera una fila, no hay necesidad de usar un ciclo // Nota: Si coloca extract($fila); dentro del siguiente ciclo, // estara creando $id_usuario, $nombre_completo, y $status_usuario while ($fila = mysql_fetch_assoc($resultado)) { echo $fila["id_usuario"]; echo $fila["nombre_completo"]; echo $fila["status_usuario"]; } mysql_free_result($resultado); ?> ]]> </programlisting> </example> </para> <para> Vea también <function>mysql_fetch_row</function>, <function>mysql_fetch_array</function>, <function>mysql_query</function> y <function>mysql_error</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 --> Index: phpdoc-es/reference/mysql/functions/mysql-get-client-info.xml +++ phpdoc-es/reference/mysql/functions/mysql-get-client-info.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.4 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/mysql.xml, last change in rev 1.62 --> <refentry id="function.mysql-get-client-info"> <refnamediv> <refname>mysql_get_client_info</refname> <refpurpose>Obtener información del cliente MySQL</refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>string</type><methodname>mysql_get_client_info</methodname> <void/> </methodsynopsis> <para> <function>mysql_get_client_info</function> devuelve una cadena que representa la versión de la librería cliente. </para> <para> <example> <title>Ejemplo de <function>mysql_get_client_info</function></title> <programlisting role="php"> <![CDATA[ <?php printf ("Información del cliente MySQL: %s\n", mysql_get_client_info()); ?> ]]> </programlisting> <para> El anterior ejemplo produciría la siguiente salida: </para> <screen> <![CDATA[ Información del cliente MySQL: 3.23.39 ]]> </screen> </example> </para> <para> Vea también <function>mysql_get_host_info</function>, <function>mysql_get_proto_info</function> y <function>mysql_get_server_info</function>. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: phpdoc-es/reference/mysql/functions/mysql-get-host-info.xml +++ phpdoc-es/reference/mysql/functions/mysql-get-host-info.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.6 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/mysql.xml, last change in rev 1.62 --> <refentry id="function.mysql-get-host-info"> <refnamediv> <refname>mysql_get_host_info</refname> <refpurpose>Obtener información de la máquina anfitriona MySQL</refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>string</type><methodname>mysql_get_host_info</methodname> <methodparam choice="opt"><type>resource</type><parameter>id_enlace</parameter></methodparam> </methodsynopsis> <para> <function>mysql_get_host_info</function> devuelve una cadena que describe el tipo de conexión en uso con <parameter>id_enlace</parameter>, incluyendo el nombre del equipo servidor anfitrión. Si se omite <parameter>id_enlace</parameter>, se usará la última conexión abierta. </para> <para> <example> <title>Ejemplo de <function>mysql_get_host_info</function></title> <programlisting role="php"> <![CDATA[ <?php mysql_connect("localhost", "mysql_user", "mysql_password") or die("No pudo conectarse: " . mysql_error()); printf ("Información del equipo anfitrión MySQL: %s\n", mysql_get_host_info()); ?> ]]> </programlisting> <para> El ejemplo anterior produciría la siguiente salida: </para> <screen> <![CDATA[ Información del equipo anfitrión MySQL: Localhost via UNIX socket ]]> </screen> </example> </para> <para> Vea también <function>mysql_get_client_info</function>, <function>mysql_get_proto_info</function> y <function>mysql_get_server_info</function>. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->
Index: phpdoc-es/translation.xml diff -u phpdoc-es/translation.xml:1.62 phpdoc-es/translation.xml:1.63 --- phpdoc-es/translation.xml:1.62 Mon Sep 29 21:15:32 2003 +++ phpdoc-es/translation.xml Thu Oct 2 03:12:58 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.62 $ --> +<!-- $Revision: 1.63 $ --> <!DOCTYPE translation SYSTEM "../entities/translation.dtd"> <translation> @@ -32,9 +32,6 @@ <file name="faq/databases.xml" person="webstudio" type="translation" date="11.05.2003"/> <file name="faq/general.xml" person="webstudio" type="translation" date="11.05.2003"/> <file name="faq/html.xml" person="webstudio" type="translation" date="11.05.2003"/> -<file name="reference/mysql/functions/mysql-fetch-assoc.xml" person="lboshell" type="translation" date="14.09.2003"/> -<file name="reference/mysql/functions/mysql-get-client-info.xml" person="lboshell" type="translation" date="14.09.2003"/> -<file name="reference/mysql/functions/mysql-get-host-info.xml" person="lboshell" type="translation" date="14.09.2003"/> <file name="reference/mysql/functions/mysql-get-proto-info.xml" person="lboshell" type="translation" date="14.09.2003"/> <file name="reference/mysql/functions/mysql-get-server-info.xml" person="lboshell" type="translation" date="14.09.2003"/> <file name="reference/mysql/functions/mysql-info.xml" person="lboshell" type="translation" date="14.09.2003"/> Index: phpdoc-es/security/index.xml diff -u phpdoc-es/security/index.xml:1.2 phpdoc-es/security/index.xml:1.3 --- phpdoc-es/security/index.xml:1.2 Tue Sep 16 13:59:03 2003 +++ phpdoc-es/security/index.xml Thu Oct 2 03:13:00 2003 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> -<!-- EN-Revision: 1.61 Maintainer: lboshell Status: ready --> +<!-- $Revision: 1.3 $ --> +<!-- EN-Revision: 1.62 Maintainer: lboshell Status: ready --> <chapter id="security.index"> <title>Seguridad</title> Index: phpdoc-es/reference/mysql/functions/mysql-fetch-assoc.xml +++ phpdoc-es/reference/mysql/functions/mysql-fetch-assoc.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.8 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/mysql.xml, last change in rev 1.45 --> <refentry id="function.mysql-fetch-assoc"> <refnamediv> <refname>mysql_fetch_assoc</refname> <refpurpose> Recupera una fila de resultado como una matriz asociativa </refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>array</type><methodname>mysql_fetch_assoc</methodname> <methodparam><type>resource</type><parameter>resultado</parameter></methodparam> </methodsynopsis> <para> Devuelve una matriz asociativa que corresponde a la fila recuperada, o &false; si no hay más filas. </para> <para> <function>mysql_fetch_assoc</function> es equivalente a llamar <function>mysql_fetch_array</function> con MYSQL_ASSOC como segundo parámetro opcional. Únicamente devuelve una matriz asociativa. Esta es la forma en que originalmente trabajaba <function>mysql_fetch_array</function>. Si necesita índices numéricos así como asociativos, utilice <function>mysql_fetch_array</function>. </para> <para> Si dos o más columnas del resultado tienen los mismos nombres de campo, la última columna tomará precedencia. Para acceder a otras columnas con el mismo nombre, tendrá que acceder al resultado con índices numéricos mediante el uso de <function>mysql_fetch_row</function> o agregar sobrenombres. Vea el ejemplo en la descripción de <function>mysql_fetch_array</function> respecto a los sobrenombres. </para> <para> Algo importante a notar es que el uso de <function>mysql_fetch_assoc</function> <emphasis>no es significativamente</emphasis> más lento que el uso de <function>mysql_fetch_row</function>, al mismo tiempo que provee un valor agregado considerable. </para> &database.field-case; <para> <example> <title>Un ejemplo extendido de <function>mysql_fetch_assoc</function></title> <programlisting role="php"> <![CDATA[ <?php $conexion = mysql_connect("localhost", "mysql_user", "mysql_password"); if (!$conexion) { echo "No pudo conectarse a la BD: " . mysql_error(); exit; } if (!mysql_select_db("nombre_de_la_bd")) { echo "No ha sido posible seleccionar la BD: " . mysql_error(); exit; } $sql = "SELECT id as id_usuario, nombre_completo, status_usuario FROM alguna_tabla WHERE status_usuario = 1"; $resultado = mysql_query($sql); if (!$resultado) { echo "No pudo ejecutarse satisfactoriamente la consulta ($sql) " . "en la DB: " . mysql_error(); exit; } if (mysql_num_rows($resultado) == 0) { echo "No se han encontrado filas, nada a imprimir, asi que voy " . "a detenerme."; exit; } // Mientras exista una fila de datos, colocar esa fila en $fila // como una matriz asociativa // Nota: Si solo espera una fila, no hay necesidad de usar un ciclo // Nota: Si coloca extract($fila); dentro del siguiente ciclo, // estara creando $id_usuario, $nombre_completo, y $status_usuario while ($fila = mysql_fetch_assoc($resultado)) { echo $fila["id_usuario"]; echo $fila["nombre_completo"]; echo $fila["status_usuario"]; } mysql_free_result($resultado); ?> ]]> </programlisting> </example> </para> <para> Vea también <function>mysql_fetch_row</function>, <function>mysql_fetch_array</function>, <function>mysql_query</function> y <function>mysql_error</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 --> Index: phpdoc-es/reference/mysql/functions/mysql-get-client-info.xml +++ phpdoc-es/reference/mysql/functions/mysql-get-client-info.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.4 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/mysql.xml, last change in rev 1.62 --> <refentry id="function.mysql-get-client-info"> <refnamediv> <refname>mysql_get_client_info</refname> <refpurpose>Obtener información del cliente MySQL</refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>string</type><methodname>mysql_get_client_info</methodname> <void/> </methodsynopsis> <para> <function>mysql_get_client_info</function> devuelve una cadena que representa la versión de la librería cliente. </para> <para> <example> <title>Ejemplo de <function>mysql_get_client_info</function></title> <programlisting role="php"> <![CDATA[ <?php printf ("Información del cliente MySQL: %s\n", mysql_get_client_info()); ?> ]]> </programlisting> <para> El anterior ejemplo produciría la siguiente salida: </para> <screen> <![CDATA[ Información del cliente MySQL: 3.23.39 ]]> </screen> </example> </para> <para> Vea también <function>mysql_get_host_info</function>, <function>mysql_get_proto_info</function> y <function>mysql_get_server_info</function>. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: phpdoc-es/reference/mysql/functions/mysql-get-host-info.xml +++ phpdoc-es/reference/mysql/functions/mysql-get-host-info.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.6 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/mysql.xml, last change in rev 1.62 --> <refentry id="function.mysql-get-host-info"> <refnamediv> <refname>mysql_get_host_info</refname> <refpurpose>Obtener información de la máquina anfitriona MySQL</refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>string</type><methodname>mysql_get_host_info</methodname> <methodparam choice="opt"><type>resource</type><parameter>id_enlace</parameter></methodparam> </methodsynopsis> <para> <function>mysql_get_host_info</function> devuelve una cadena que describe el tipo de conexión en uso con <parameter>id_enlace</parameter>, incluyendo el nombre del equipo servidor anfitrión. Si se omite <parameter>id_enlace</parameter>, se usará la última conexión abierta. </para> <para> <example> <title>Ejemplo de <function>mysql_get_host_info</function></title> <programlisting role="php"> <![CDATA[ <?php mysql_connect("localhost", "mysql_user", "mysql_password") or die("No pudo conectarse: " . mysql_error()); printf ("Información del equipo anfitrión MySQL: %s\n", mysql_get_host_info()); ?> ]]> </programlisting> <para> El ejemplo anterior produciría la siguiente salida: </para> <screen> <![CDATA[ Información del equipo anfitrión MySQL: Localhost via UNIX socket ]]> </screen> </example> </para> <para> Vea también <function>mysql_get_client_info</function>, <function>mysql_get_proto_info</function> y <function>mysql_get_server_info</function>. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->