butsags
10-16-2009, 05:44 PM
Okay so i has a start already.
$query = mysql_query("SELECT * FROM inventoryitems WHERE characterid = '$id' AND inventorytype = -1 AND position = -101");
while($row = mysql_fetch_array($query)){
$equipt = $row[itemid];
echo "
<img src=\"http://www.mapletip.com/images/maplestory-monsters/0$equipt.png\">";
}
I would like to somehow say, if there is no item that qualifies the specifications of $query , then to show <img src="images/none.png">
sorry i barely know any mysql implementing
i guess it would have to be something like
IF $query amount > 0 {
echo "
<img src=\"http://www.mapletip.com/images/maplestory-monsters/0$equipt.png\">
";
} else {
echo "
<img src=\"images/none.png\">";
}
but i just don't know how to correctly say that.
I would be extremely grateful for any help.
thanks
$query = mysql_query("SELECT * FROM inventoryitems WHERE characterid = '$id' AND inventorytype = -1 AND position = -101");
while($row = mysql_fetch_array($query)){
$equipt = $row[itemid];
echo "
<img src=\"http://www.mapletip.com/images/maplestory-monsters/0$equipt.png\">";
}
I would like to somehow say, if there is no item that qualifies the specifications of $query , then to show <img src="images/none.png">
sorry i barely know any mysql implementing
i guess it would have to be something like
IF $query amount > 0 {
echo "
<img src=\"http://www.mapletip.com/images/maplestory-monsters/0$equipt.png\">
";
} else {
echo "
<img src=\"images/none.png\">";
}
but i just don't know how to correctly say that.
I would be extremely grateful for any help.
thanks