I have 9 MySQL queries to execute in PHP, and I am trying to execute them like this:
if(mysqli_query($con, $q1)){
?><p>Query 1 complete</p><?
}
if(mysqli_query($con, $q2)){
?><p>Query 2 complete</p><?
}
if(mysqli_query($con, $q3)){
?><p>Query 3 complete</p><?
}
if(mysqli_query($con, $q4)){
?><p>Query 4 complete</p><?
}
if(mysqli_query($con, $q5)){
?><p>Query 5 complete</p><?
}
if(mysqli_query($con, $q6)){
?><p>Query 6 complete</p><?
}
if(mysqli_query($con, $q7)){
?><p>Query 7 complete</p><?
}
if(mysqli_query($con, $q8)){
?><p>Query 8 complete</p><?
}
if(mysqli_query($con, $q9)){
?><p>Query 9 complete</p><?
}
But for some reason, only the first one is being executed, and showing up in the DB. The rest are not completing. Is there something I am missing about executing multiple queries, or is there a syntax mistake I am not seeing?
And here is $q2, because it doesn't seem to want to get past that:
$q2 = "INSERT INTO outboundapps
(appid,
fk_outboundappkey,
name,
browser,
fk_urls,
fk_routes,
virtualplatform,
autoanswer,
fk_get)
VALUES ($last + 2,
$last + 2,
$oname,
$otype,
$last + 2,
$last + 2,
$ovirtualplatform,
1,
$last + 2)";
mysqli_error()has to say.ifstart with<?php?<?shortcut does not work by default. You need to configure it.