Dark_Wizard
06-02-2003, 01:19 PM
I need another pair of eyes to help me with this query, first I will list the schema of both tables,
membergames:
membergamesid
userid
gameid
games:
gameid
gamename
here is the query I'm trying to create which is listing all the available games in the games table and then using a makeyesnocode to give the option to select the game and also provide for the one the user has already selected, it's not working right (see screenshot). Here is the query I'm using:
maketableheader("Member Games");
$usergames=$DB_site->query_first("SELECT * FROM vwar_membergames WHERE userid=$userid");
$membergames=$DB_site->query("SELECT gameid,gamename FROM vwar_games ORDER BY gamename ASC");
while ($membergame=$DB_site->fetch_array($membergames)) {
$varname="$usergames[gameid]";
makeyesnocode($membergame[gamename],$usergames[gameid],$usergames[$varname]);
}
Thanks....
membergames:
membergamesid
userid
gameid
games:
gameid
gamename
here is the query I'm trying to create which is listing all the available games in the games table and then using a makeyesnocode to give the option to select the game and also provide for the one the user has already selected, it's not working right (see screenshot). Here is the query I'm using:
maketableheader("Member Games");
$usergames=$DB_site->query_first("SELECT * FROM vwar_membergames WHERE userid=$userid");
$membergames=$DB_site->query("SELECT gameid,gamename FROM vwar_games ORDER BY gamename ASC");
while ($membergame=$DB_site->fetch_array($membergames)) {
$varname="$usergames[gameid]";
makeyesnocode($membergame[gamename],$usergames[gameid],$usergames[$varname]);
}
Thanks....