Re: Printing MSSQL-Query ERROR description in PHP

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

 



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

---------------------------------
 Download prohibited? No problem! CHAT from any browser, without download.

I'm confused, mysql_error() does return the error description from mysql.

Try running this query on one of your databases:

$rs = mysql_query("SELECT non_existant_column WHERE some_column = 1") or die(mysql_error());

Running that will print out the error in the query. (Intended errors heres)

Darren

--
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