1
0
mirror of https://github.com/php/doc-es.git synced 2026-03-26 08:22:08 +01:00
Files
archived-doc-es/reference/cubrid/functions/cubrid-error-code.xml
Pedro Antonio Gil Rodríguez f309524892 Updated to the most recent version
git-svn-id: https://svn.php.net/repository/phpdoc/es/trunk@330721 c90b9560-bf6c-de11-be94-00142212c4b1
2013-07-01 10:32:52 +00:00

103 lines
2.6 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 6fbb2db68cc01569ddb70a2c3fdaa8b532ec7beb Maintainer: seros Status: ready -->
<!-- Reviewed: no -->
<refentry xml:id="function.cubrid-error-code" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>cubrid_error_code</refname>
<refpurpose>Obtener el código de error de la llamada a una función más reciente</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>int</type><methodname>cubrid_error_code</methodname>
<void />
</methodsynopsis>
<para>
La función <function>cubrid_error_code</function> se usa para obtener el
código de error del error que ocurrión durante la ejecución de la API. Normalmente
obtiene el código de error cuando la API devuelve false como valor de retorno.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
&no.function.parameters;
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Código de error del error que ocurrió, o <literal>0</literal> (cero) si no
ocurre ningún error.
</para>
<para />
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example>
<title>Ejemplo de <function>cubrid_error_code</function></title>
<programlisting role="php">
<![CDATA[
<?php
$conn = cubrid_connect("localhost", 33000, "demodb");
$req = cubrid_prepare($conn , "SELECT * FROM code WHERE s_name=?");
$req = @cubrid_execute($req);
if (!$req) {
printf("Dispositivo del error: %d\nCódigo de error: %d\nMensaje de error: %s\n",
cubrid_error_code_facility(), cubrid_error_code(), cubrid_error_msg());
cubrid_disconnect($conn);
exit;
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Dispositivo del error: 4
Código de error: -30015
Mensaje de error: Some parameter not binded
]]>
</screen>
</example>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>cubrid_error_code_facility</function></member>
<member><function>cubrid_error_msg</function></member>
</simplelist>
</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:"~/.phpdoc/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
-->