note 14400 added to function.mssql-get-last-message.php
| From: | richard at alpinenetworking dot com | Date: | Mon, 30 Jul 2001 06:31:15 +0000 |
| Subject: | note 14400 added to function.mssql-get-last-message.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-16044@lists.php.net to get a copy of this message | ||
To get a numeric error code from mssql you can do a select that looks something like "select
@@ERROR as ErrorCode".
@@ERROR is a global variable that always contains the error code for the last SQL statement run on
the current connection. If there is no error, code will equal 0.
@@IDENTITY is another useful one to know. It is the value of the last identity created (similar to
MySQL's auto_increment field) and with this you can create a function that works like
MySQL's mysql_insert_id() function.
http://www.php.net/manual/en/function.mssql-get-last-message.php