whiteboikyle Posted April 17, 2008 Share Posted April 17, 2008 Okay i have a mysql database that has a table called members.. Well in it i have their ID Username PW etc etc etc and then i have a maingame... This main game is a ID. Well i also have a table called gamesplayed that list gamename gamepic. So i am trying to make a function that will show all the usernames that have each 1 of those games.. i already made a function to show all the pictures.. but the actual stats i cant figure out.. Here is my pic function. function getGamePlayedPic() { global $dbprefix; $query = "SELECT * FROM {$dbprefix}gamesplayed"; $result = mysql_query($query) or die(mysql_error()); echo '<table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr>'; for ($i = 0; $i < mysql_num_rows($result); $i = $i + 1) { $gamepic = mysql_result($result, $i, "gamepic"); $gamename = mysql_result($result, $i, "gamename"); echo ("<td><div align='center'><img src=\"$gamepic\" alt=\"$gamename\"></div></td>"); } echo ' </tr> </table>'; } Link to comment https://forums.phpfreaks.com/topic/101478-okay-creating-a-function/ Share on other sites More sharing options...
whiteboikyle Posted April 17, 2008 Author Share Posted April 17, 2008 Sorry let me clean this up a little for better understandings.. Pretty much on the main game their is something like 5 6 7 10 11 12 13 14 which all are ID's for each game.. I want it to Display how many members for each maingame ID Link to comment https://forums.phpfreaks.com/topic/101478-okay-creating-a-function/#findComment-519104 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.