I have a PHP page which executes and inserts 3 different queries in a SQL Server database.
What is the best way to perform error handling with this?
Basically, I only want to execute them in series, so if the first one fails then DO NOT continue and basically put an error back to the client.
I have currently stored them in variables like
$sql_1 = "insert into ..."
and
$sql_2 = "insert into ..."
Then I was using if statements which were doing the calling of the variable but it just seems very messy.