I noticed that it would only run the 1st query (inserting into armory) but not the other two. So I googled and came up with this, same problem though, still only running the 1st query.
Code: Select all
$db->multi_query(" Many SQL queries ; ");
while ($db->next_result()) {;}
$db->query("INSERT INTO `armory` (`itemname`,`level`,`type`,`iclass`,`speedadd`,`poweradd`,`meleeadd`,`magicadd`,`archadd`,`intadd`,`luckadd`,`healthadd`,`enchantslots`,`itemcost`)VALUES('$wepname','$wlvl','$type','$class','$speed','$power','$mel','$mage','$arch','$int','$luck','$health','$slots','$cost')"); // now executed!
$db->query("DELETE FROM `playeritems` WHERE `charname`='$warrior' AND `citemid`='$wepid'");
$db->query("UPDATE `characters` SET `gold`=`gold`+'$gold' WHERE `charname`='$warrior'");