ctsql_errno
Returns the numerical value of the error message from previous c-treePHP operation
Declaration
int ctsql_errno ()
Returns
Returns the error number from the most recently executed c-treePHP function (not including ctsql_error() and ctsql_errno()), or 0 (zero) if no error occurred.
Example
<?php
$link = ctsql_connect("ctreeSQL", "admin", "ADMIN");
if (!$link) {
echo ctsql_errno() . ": " . ctsql_error(). "\n";
}
if (!ctsql_query("SELECT * FROM nonexistenttable", $link)) {
echo ctsql_errno() . ": " . ctsql_error() . "\n";
}
?>
The above example would produce the following output if nonexistenttable does not exist:
-20005: Table/View/Synonym not found
See also
ctsql_error()