So I have an inventory script and I am running a process to make sure that the item being equipped doesn't have a similar class already equipped or it will give them an error.
Well I have as much code as I do below and when there is one item equipped of that class it wont equip cause it knows better. But when there is nothing equipped and I try to equip it just kills the script and doesn't finish though.
This started happening after I added the msql_num_rows. Before that everything was equipping fine but I was able to equip multiple.
Can you see the problem, cause I can't?
if(ISSET($_POST['Equip'])){
$WeperID=$_POST['wepider'];
$Beatbox2="SELECT * FROM Inventory WHERE ID='".$WeperID."'";
$Beatboxing2=mysql_query($Beatbox2)or die(mysql_error());
$New=mysql_fetch_array($Beatboxing2)or die(mysql_error());
$Ing="SELECT * FROM `Inventory` WHERE Class='$New[Class]' AND Equipped='Yes' AND Owner='$Player'";
$Offlol=mysql_query($Ing)or die(mysql_error());
$Jacker=mysql_num_rows($Offlol)or die(mysql_error());
if($Jacker==1){
print"You can only have one ".$New['Class']." equipped at a time!<br />";
}else{
mysql_query("UPDATE Users SET EMaxHealth=EMaxHealth+'$New[HealthBonus]', EMaxEnergy=EMaxEnergy+'$New[EnergyBonus]', EStrengthBonus=EStrengthBonus+'$New[StrengthBonus]', EWisdomBonus=EWisdomBonus+'$New[WisdomBonus]', EDefenceBonus=EDefenceBonus+'$New[DefenceBonus]', EDexterityBonus=EDexterityBonus+'$New[DexterityBonus]', EAccuracyBonus=EAccuracyBonus+'$New[AccuracyBonus]' WHERE ID='$Player'")or die(mysql_error());
mysql_query("UPDATE Inventory SET Equipped='Yes' WHERE ID='".$WeperID."'")or die(mysql_error());
print"Item equipped!<br />";
}
}