Last error message (STRING) if successful, and FALSE if
there are any errors
UsageThe edb_errmsg function returns the error message for the last call to any of the edb_* functions present in the ElevateDB PHP Extension API. For a list of all ElevateDB error codes and messages, please see Appendix A - Error Codes and Messages.
This function only returns the error message for the last API call. Any subsequent calls to edb_* functions will clear any error codes/messages.
<?php
// The following script connects to an ElevateDB
// Server and database, returning any error code/message
// if there was an error connecting
$con = edb_connect("type=remote;charset=Ansi;address=127.0.0.1;"+
"uid=Administrator;pwd=EDBDefault;database=Test");
if (!$con)
{
die("Could not connect: (" . edb_errcode() . ") " . edb_errmsg());
}
$cmd = edb_prepare($con,"customer",EDB_COMMAND_TABLE);
$cursor = edb_execute($cmd);
edb_disconnect($con);
?>