Mam funkcję w klasie Game:
function GetItemProfile($character, $SetItem)
{
$ItemsProfile = mysql_fetch_assoc(mysql_query("SELECT * FROM game_user_items WHERE character_name='" . $character . "'"));
$ItemProfile = mysql_fetch_assoc(mysql_query("SELECT * FROM game_items WHERE item_image='" . $ItemsProfile[$SetItem] . "'"));
$Item = array($ItemProfile['item_image'], $ItemProfile['item_name'], $ItemProfile['item_job'], $ItemProfile['item_type'], $ItemProfile['item_level'], $ItemProfile['item_attack'], $ItemProfile['item_defence'], $ItemProfile['item_matt']);
$ItemInfo = 'Poziom: ' . $Item[4] . '<BR>
Typ: ' . $Item[3] . '<BR>
Profesje: ' . $Item[2] . '<BR><BR>
Atak: ' . $Item[5] . '<BR>
Obrona: ' . $Item[6] . '<BR>
Atak magiczny: ' . $Item[7];
echo '<img src="' . $Item[0] . '" title="header=[' . $Item[1] . '] body=[' . $ItemInfo . ']">';
}
Następnie, kod wyświetlający ekwipunek:
echo '
<table border=1>
<tr><td>Hełm</td> <td>Zbroja</td> <td>Broń</td> <td>Tarcza</td> <td>Spodnie</td> <td>Dodatek</td></tr>
<tr>
<td>' . $Game->GetItemProfile($GlobalUserAccount['character_name'], "helmet") . '</td>
<td>' . $Game->GetItemProfile($GlobalUserAccount['character_name'], "armor") . '</td>
<td>' . $Game->GetItemProfile($GlobalUserAccount['character_name'], "weapon") . '</td>
<td>' . $Game->GetItemProfile($GlobalUserAccount['character_name'], "shield") . '</td>
<td>' . $Game->GetItemProfile($GlobalUserAccount['character_name'], "pants") . '</td>
<td>' . $Game->GetItemProfile($GlobalUserAccount['character_name'], "addon") . '</td>
</tr>
</table>';
Moje pytanie:
Dlaczego zwracana przez funkcję wartość nie jest integrowana z tabelą ? Co to zanczy ?
Własnie to:
http://img126.imageshack.us/img126/5804/cccmt7.jpg
Jak temu zaradzić ?