this should help
$results = mysql_query("SELECT author FROM news WHERE post_number='$counter'", $connection);
if ($results || die("Bad Query".mysql_error()){
//were any results returned?
if (mysql_num_rows($results) || die('No Results Returned")){
//get the data from the resource ID and put it in an associative array
while($row = mysql_fetch_array($results,MYSQL_ASSOC)){
$Author[] = $row['author'];
}
}
}
You do not have to use the die() statements, the main thing in the above code is how to retrieve the results.
Now you can access the data in $Author with
if (is_array($Author)){
echo $Author[0];
}
or if more than 1 record will be returned
if (is_array($Author)){
foreach($Author as $value){
echo $value.'<BR>';
}
}