Hi, I am working on a script that checks to see if you have a certain piece of equipment, and if you have 1 or more it will list them and their options, or if you dont have it, it will simply just not show you anything. There seems to be a problem with it, because it isnt showing me anything and i have the piece of equipment it requires.
<?
$torch = mysql_query("select * from equipment where type=Light and owner=$stat[id]");
if (!empty ($torch[id])) {
print "<b>Lights</b><table>
<tr><td class=tbody width=50><b><u>Name</td><td class=tbody width=100><b><u>Desc</td><td class=tbody><b><u>Options</td></tr>";
$esel = mysql_query("select * from equipment where type='Light' and owner=$stat[id]");
while ( $equip = mysql_fetch_array($torch)) {
print "<tr>
<td class=tbody><a href=\"item.php?view=".$equip['id']."\"><img src=\"images/items/".$equip['name'].".png\" border=0></a></td>
<td class=tbody><b>".$equip['name']."</b> <br>".$desc[$equip['name']]."<br>Uses: $equip[more] </td>
<td class=tbody><a href=\"item.php?drop=$equip[id]\">Drop</a></td>
</tr>";
}
print "</table>";
} else {
print "";
}
?>
Thanks alot for taking a look at this.