Query Error Function

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
markyboy17
Forum Newbie
Posts: 7
Joined: Mon Jan 16, 2012 3:38 am

Query Error Function

Post 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
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Query Error Function

Post by Celauran »

Do you mean sqlsrv_errors()?
Post Reply