ptmuldoon
02-05-2008, 05:32 PM
I'm trying to join two tables that have a common field of 'gid' and to place the results of both tables into an array. And I'm not sure if I have the query wrong, or if I am creating the array incorrectly.
Am I going about it the correct way?
//Get the Player info
$sql2 = "SELECT * FROM game_players AS PINFO UNION SELECT * FROM game_info AS GINFO";
$query2 = mysql_query($sql2);
while ($row = mysql_fetch_assoc($query2)){
$pdata[] = $row;
}
Am I going about it the correct way?
//Get the Player info
$sql2 = "SELECT * FROM game_players AS PINFO UNION SELECT * FROM game_info AS GINFO";
$query2 = mysql_query($sql2);
while ($row = mysql_fetch_assoc($query2)){
$pdata[] = $row;
}