mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-22 11:58:55 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@153793 c90b9560-bf6c-de11-be94-00142212c4b1
84 lines
2.5 KiB
XML
84 lines
2.5 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.4 $ -->
|
|
<!-- EN-Revision: 1.3 Maintainer: baoengb Status: ready -->
|
|
<refentry id="function.mysqli-connect-error">
|
|
<refnamediv>
|
|
<refname>mysqli_connect_error</refname>
|
|
<refpurpose>Regresa una descripción del último error de la
|
|
conexión</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Descripción</title>
|
|
<methodsynopsis>
|
|
<type>cadena</type><methodname>mysqli_connect_error</methodname>
|
|
<methodparam><type>void</type><parameter></parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
La función <function>mysqli_connect_error</function> es identica a
|
|
la función <function>mysqli_connect_errno</function>, excepto en que
|
|
en vez de regresar el número del código de error, la función
|
|
<function>mysqli_connect_error</function> regresará el mensaje de error
|
|
correspondiente a la última llamada a la función <function>mysqli_connect</function>.
|
|
Si no ha ocurrido error, está función regresará una cadena
|
|
vacía.
|
|
</para>
|
|
</refsect1>
|
|
<refsect1>
|
|
<title>Valores regresados</title>
|
|
<para>
|
|
Una cadena que describe el error o una cadena vacía si no ha ocurrido
|
|
error.
|
|
</para>
|
|
</refsect1>
|
|
<refsect1>
|
|
<title>Vea tambié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
|
|
-->
|