Here is the code:
$sql = "select from clan_game_list where game = '$POST[gameName]'";
$result = mysql_query($sql, $connection) or die(mysql_error());
while ($newArray = mysql_fetch_array($result)) {
$getListingID = $newArray['id'];
$sql2 = "select from Clan_Data where consoleType = 'PC' AND ageType = '$POST[age]' AND id = '$getListingID'";
$result2 = mysql_query($sql2,$connection) or die(mysql_error());
$hits = mysql_num_rows($result2);
}
The problem is that hits always comes up with 1, and this is because it only gets the last entry. When in fact there are 4 entries.
How do I get it to print out all the entries, not just the last one