version 2004
MySQL_ErrorCode (connID) Longint
| Parameter | Type | Description | |
| connID | Longint | Connection ID returned by MySQL_Connect | |
| Function result | Longint | Error code (where 0 means no error) |
Description
The MySQL_ErrorCode command returns the MySQL error code for the last call to MySQL_Select/MySQL_Execute. It returns 0 if the call executed successfully.
connID is a Longint returned from MySQL_Connect.
Example
MySQL_Execute(connID;"UPDATE clients SET good_one='Yes' WHERE zip_code='90210'")
$err:=MySQL_ErrorCode(connID)
If($err#0)
ALERT("Error # "+String($err))
End if