Re: Printing MSSQL-Query ERROR description in PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



karthi keyan wrote:
  Is there any way to print the reason why the query has been failed, like the way MySQL-PHP has mysql_error()?

Hmm, where to look for information on the MSSQL functions in PHP.

Hey, I got a crazy plan. Let's try looking in the MSSQL part of the PHP manual. Come navigate there with me: http://php.net/mssql

Let's scroll down to find the function list. Ahh, there is it. Hmm, what we got here the... bind, close, connect, data_seek. Nope, none of those. Let's keep going.

Oooh, do you see what I see? mssql_get_last_message - that sounds promising. What does the description say? "Returns the last message from the server". Well, if there's been an error in the last query we tried to run it makes sense that the last message from the server would contain the error message.

Hey, how about this. You try that and let us know whether you learnt something from this lesson.

-Stut

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux