So this is kind of tough to explain, bear with me. I want it to show how many sets you have if an item is identical multiple times. So default would be 1 Set. If an item matches twice, it would show 2 Sets.
I am using mysql_fetch_array and mysql_num_rows for my queries. But how do I set it up to check all items for multiple matches?
Like if I had a Long Sword, and there are two of them, It should show Long Sword (2 Sets). I have all the other coding finished, just need the sets completed.
Here is my coding where I need to find a way to add it.
I am using mysql_fetch_array and mysql_num_rows for my queries. But how do I set it up to check all items for multiple matches?
Like if I had a Long Sword, and there are two of them, It should show Long Sword (2 Sets). I have all the other coding finished, just need the sets completed.
Here is my coding where I need to find a way to add it.
PHP Code:
$page .= '<p><table width="95%">';
if (mysql_num_rows($weaponquery) == 0) {
$page .= 'You have no weapons.<br />';
}
else {
while ($wrow = mysql_fetch_array($weaponquery)) {
$page .= '<tr><td><b>Weapon Name</b></td><td><b>Min Level</b></td><td><b>Damage</b></td><td><b>Class</b></td><td><b>Upgrade</b></td><td><b>Action</b></td><td><b>Sets</b></td></tr>';
$page .= "<tr><td>".$wrow['name']."</td><td>Lvl ".$wrow['requirement']."</td><td>+".$wrow['attribute']."</td><td>$weapon1</td><td>+".$wrow['bonusattack']."</td><td>EQUIP</td><td>1</td></tr>";
}
}
$page .= '</table>';
Comment