samedi 25 juin 2016
PHP MySQL While loop for SELECT from two tables
i have been coding my site for sometime and now i have a first problem and i hope that i get help here. So basically i have a table called games from that table i get gameID, cost and percent for the game but the problem is that i should get the the GameHash for the each gameID from table called GameHash.
Lets say that on games table have gameID that is 50 and on hash table there is columns gameID = 50 and GameHash = 868ab7bea61c2cf71d328fa21cb0b28f and i need show the GameHash for certain game.
This is what i have done so far:
<?php
$rs = mysql_query("SELECT id, cost, percent FROM games WHERE userid = '".$Steamid."' ORDER BY `games`.`id` DESC ");
while($row = mysql_fetch_array($rs))
{
echo'
<tr>
<td>'.$row["id"].'</td>
<td>$'.round($row["cost"],2).'</td>
<td>'.round($row["percent"],1).'%</td>
';
}
echo'
</tbody>
</table>
';
?>
and the what i am looking for that it should show GameHash for each gameID
Inscription à :
Publier les commentaires (Atom)
Aucun commentaire:
Enregistrer un commentaire