mysql_fetch_array only pulls one row, not the entire dataset. ( link)
You will need to loop through the results for the first query... something like...
Code:
$results = array();
while ($row = mysql_fetch_array($query)){
$results[] = $row;
}
...will put the results of your query into an array called $results.
You will then need to use the loop of your choice to accomplish echoing your results. Something like...
Code:
for($i=0; $i < count($results); $i++)
{
echo "[" . $results[$i]['messid'] . "] " . $results[$i]['messtitle'] . " - " . $username . "<br />";
}
Untested, of course, but it should put you on the right track as to what sections of the PHP manual to research.
Hope that helps...!
Mike
Last edited by .Mike; 06-06-2005 at 09:54 AM..
|