Page 1 of 1

Query Error Function

Posted: Tue Apr 17, 2012 5:14 am
by markyboy17
Is there a PHP function that checks for an error in a SQL Query i am running for example below is a query i am running on my web application

Code: Select all

sqlsrv_query($Connect, $PER1sql, $PERparams1);
What would be the code for if sqlsrv_query returns an error than show error message.

Thanks

Re: Query Error Function

Posted: Tue Apr 17, 2012 6:25 am
by Celauran
Do you mean sqlsrv_errors()?