Sophie

Sophie

distrib > PLD > ac > amd64 > media > dist > by-pkgid > dd8ef74e7a184506d40e4328053fb785 > files > 2008

php-manual-ro-20051028-1.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML
><HEAD
><TITLE
>mysqli_connect_error</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="Manual PHP"
HREF="index.html"><LINK
REL="UP"
TITLE="Improved MySQL Extension"
HREF="ref.mysqli.html"><LINK
REL="PREVIOUS"
TITLE="mysqli_connect_errno"
HREF="function.mysqli-connect-errno.html"><LINK
REL="NEXT"
TITLE="mysqli_connect"
HREF="function.mysqli-connect.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=ISO-8859-2"></HEAD
><BODY
CLASS="refentry"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Manual PHP</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="function.mysqli-connect-errno.html"
ACCESSKEY="P"
>Înapoi</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.mysqli-connect.html"
ACCESSKEY="N"
>Înainte</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="function.mysqli-connect-error"
></A
>mysqli_connect_error</H1
><DIV
CLASS="refnamediv"
><A
NAME="AEN69153"
></A
><P
>    (PHP 5)</P
>mysqli_connect_error&nbsp;--&nbsp;Returns a string description of the last connect error</DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN69156"
></A
><H2
>Description</H2
>string <B
CLASS="methodname"
>mysqli_connect_error</B
> ( void )<BR
></BR
><P
>&#13;     The <B
CLASS="function"
>mysqli_connect_error()</B
> function is identical to the corresponding
     <A
HREF="function.mysqli-connect-errno.html"
><B
CLASS="function"
>mysqli_connect_errno()</B
></A
> function in every way, except instead of returning
     an integer error code the <B
CLASS="function"
>mysqli_connect_error()</B
> function will return
     a string representation of the last error to occur for the last 
     <A
HREF="function.mysqli-connect.html"
><B
CLASS="function"
>mysqli_connect()</B
></A
> call.
     If no error has occured, this function will return an empty string.
    </P
></DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN69167"
></A
><H2
>Return values</H2
><P
>&#13;      A string that describes the error. An empty string if no error occurred. 
    </P
></DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN69170"
></A
><H2
>See also</H2
><P
>&#13;     <A
HREF="function.mysqli-connect.html"
><B
CLASS="function"
>mysqli_connect()</B
></A
>,
     <A
HREF="function.mysqli-connect-errno.html"
><B
CLASS="function"
>mysqli_connect_errno()</B
></A
>,
     <A
HREF="function.mysqli-errno.html"
><B
CLASS="function"
>mysqli_errno()</B
></A
>,
     <A
HREF="function.mysqli-error.html"
><B
CLASS="function"
>mysqli_error()</B
></A
>,
     <A
HREF="function.mysqli-sqlstate.html"
><B
CLASS="function"
>mysqli_sqlstate()</B
></A
>
    </P
></DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN69178"
></A
><H2
>Example</H2
><P
>&#13;     <TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
CLASS="EXAMPLE"
><TR
><TD
><DIV
CLASS="example"
><A
NAME="AEN69181"
></A
><P
><B
>Exemplu 1. mysqli_connect_error sample</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><code><font color="#000000">
<font color="#0000BB">&lt;?php<br /><br />$link </font><font color="#007700">= @</font><font color="#0000BB">mysqli_connect</font><font color="#007700">(</font><font color="#DD0000">"localhost"</font><font color="#007700">, </font><font color="#DD0000">"nonexisting_user"</font><font color="#007700">, </font><font color="#DD0000">""</font><font color="#007700">);<br /><br />if (!</font><font color="#0000BB">$link</font><font color="#007700">) {<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">printf</font><font color="#007700">(</font><font color="#DD0000">"Can't connect to localhost. Error: %s\n"</font><font color="#007700">, </font><font color="#0000BB">mysqli_connect_error</font><font color="#007700">());<br />}<br /></font><font color="#0000BB">?&gt;</font>
</font>
</code></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
>
    </P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="function.mysqli-connect-errno.html"
ACCESSKEY="P"
>Înapoi</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Acas&#227;</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="function.mysqli-connect.html"
ACCESSKEY="N"
>Înainte</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>mysqli_connect_errno</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ref.mysqli.html"
ACCESSKEY="U"
>Sus</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>mysqli_connect</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>