<HTML ><HEAD ><TITLE >fbsql_errno</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="Manual de PHP" HREF="index.html"><LINK REL="UP" TITLE="FrontBase Functions" HREF="ref.fbsql.html"><LINK REL="PREVIOUS" TITLE="fbsql_drop_db" HREF="function.fbsql-drop-db.html"><LINK REL="NEXT" TITLE="fbsql_error" HREF="function.fbsql-error.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=ISO-8859-1"></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 de PHP</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.fbsql-drop-db.html" ACCESSKEY="P" >Anterior</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.fbsql-error.html" ACCESSKEY="N" >Siguiente</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="function.fbsql-errno" ></A >fbsql_errno</H1 ><DIV CLASS="refnamediv" ><A NAME="AEN17713" ></A ><P > (PHP 4 >= 4.0.6)</P >fbsql_errno -- Returns the numerical value of the error message from previous FrontBase operation </DIV ><DIV CLASS="refsect1" ><A NAME="AEN17716" ></A ><H2 >Description</H2 >int <B CLASS="methodname" >fbsql_errno</B > ( [resource link_identifier])<BR ></BR ><P > Returns the error number from the last fbsql function, or <TT CLASS="literal" >0</TT > (zero) if no error occurred. </P ><P > Errors coming back from the fbsql database backend don't issue warnings. Instead, use <B CLASS="function" >fbsql_errno()</B > to retrieve the error code. Note that this function only returns the error code from the most recently executed fbsql function (not including <A HREF="function.fbsql-error.html" ><B CLASS="function" >fbsql_error()</B ></A > and <B CLASS="function" >fbsql_errno()</B >), so if you want to use it, make sure you check the value before calling another fbsql function. <DIV CLASS="informalexample" ><A NAME="AEN17730" ></A ><P ></P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" CELLPADDING="5" ><TR ><TD ><PRE CLASS="php" ><?php fbsql_connect("marliesle"); echo fbsql_errno().": ".fbsql_error()."<BR>"; fbsql_select_db("nonexistentdb"); echo fbsql_errno().": ".fbsql_error()."<BR>"; $conn = fbsql_query("SELECT * FROM nonexistenttable;"); echo fbsql_errno().": ".fbsql_error()."<BR>"; ?></PRE ></TD ></TR ></TABLE ><P ></P ></DIV > </P ><P > See also: <A HREF="function.fbsql-error.html" ><B CLASS="function" >fbsql_error()</B ></A > and <A HREF="function.fbsql-warnings.html" ><B CLASS="function" >fbsql_warnings()</B ></A >. </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.fbsql-drop-db.html" ACCESSKEY="P" >Anterior</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Inicio</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.fbsql-error.html" ACCESSKEY="N" >Siguiente</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >fbsql_drop_db</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="ref.fbsql.html" ACCESSKEY="U" >Subir</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >fbsql_error</TD ></TR ></TABLE ></DIV ></BODY ></HTML >