Hi,
I want to get all matching results from the query in the while loop.
If $result is outside the loop it only uses the last ffnumber looped.
If $result is in the loop then $query is echoed continuously.
Any ideas?
while($row = mysql_fetch_array($result))
{
$class = $row['class_ID'];
$query = "SELECT ffnumber ".
"FROM training ".
"WHERE class_ID = '$class'";
echo $query.'<br />';
}
$result = mysql_query($query) or die(mysql_error());
$num_results = mysql_num_rows($result);
echo '<br />RESULTS:'.$num_results.'<br />';