mssql_get_last_message(3) php man page | unix.com

Man Page: mssql_get_last_message

Operating Environment: php

Section: 3

MSSQL_GET_LAST_MESSAGE(3)												 MSSQL_GET_LAST_MESSAGE(3)

mssql_get_last_message - Returns the last message from the server

SYNOPSIS
string mssql_get_last_message (void )
DESCRIPTION
Gets the last message from the MS-SQL server
PARAMETERS
This function has no parameters.
RETURN VALUES
Returns last error message from server, or an empty string if no error messages are returned from MSSQL.
EXAMPLES
Example #1 mssql_get_last_message(3) example <?php // Connect to MSSQL and select the database mssql_connect('KALLESPCSQLEXPRESS', 'sa', 'phpfi'); mssql_select_db('php'); // Make a query that will fail $query = @mssql_query('SELECT * FROM [php].[dbo].[not-found]'); if (!$query) { // The query has failed, print a nice error message // using mssql_get_last_message() die('MSSQL error: ' . mssql_get_last_message()); } ?> The above example will output something similar to: MSSQL error: Invalid object name 'php.dbo.not-found'.
SEE ALSO
mssql_min_error_severity(3), mssql_min_message_severity(3). PHP Documentation Group MSSQL_GET_LAST_MESSAGE(3)
Related Man Pages
mssql_field_length(3) - php
mssql_field_type(3) - php
mssql_close(3) - php
mssql_fetch_field(3) - php
mssql_num_fields(3) - php
Similar Topics in the Unix Linux Community
Date change related query
Problems with PHP query to MySQL database
MSSQL or SQL SERVER or SQLSERVER?
Connect to database through FTP server
Perform SQL query then FTP