Hi,
I'm currently working on a CMS for the Trinity World DB. I'm kind of new to PHP/SQL and am seeking a simple explanation for executing multiple queries at once!
Currently I am able to insert data into the creature_template database using a HTML form. This works fine as there's only one table where data needs to be inputed.
However when it comes to quests - i have no problem entering data into the quest_template table. However in order to link the quest to an NPC (start/finish) it requires the creature_questrelation, and creature_involved relation table.
So I need to take data from one form and the input the data into appropriate tables.
So far I have:
$sql="INSERT INTO creature_template (...)
VALUES (...) ";
$result = mysql_query($sql);
if($result){
header("Location: 1a_success.php#show");
}
else {
(will link error page here)
}
I need something like
$result = mysql_query($sql1, $sql2, sql3) and then have 3 queries than run. If all 3 queries are successful then I need it to redirect to a success page.
Any ideas? Thanks!