The code below is returning only ONE record. I want it to return ALL records that meet the query... It should return ALL records whose "team" field equals the value of $tm...
The $tm value is being passed through the url string and grabbed via a GET statement. I echoed the $tm and it is working properly.
------- code
$sql="SELECT * FROM schedules WHERE team LIKE '".$tm."' ORDER BY date";
$result=mysql_query($sql) or die(mysql_error());
$count=mysql_num_rows($result);
while($rows=mysql_fetch_array($result)){
echo '<tr><td>';
echo $rows['opp'];
echo '</td><td>';
echo $rows['loc'];
echo '</td><td>';
echo $rows['date'];
echo '</td></tr>';
}
Please review and help...
Our community of experts have been thoroughly vetted for their expertise and industry experience.