Trying to get the top 10 male authors from my database
that works fine .. but id also like to just get the top male author too
So since ive fecthed the top 10 , shouldnt i be able to get the top 1 from that?
$top_males_query = mysql_query("SELECT `username` , `rating` FROM `shocc_users` WHERE `gender` = 'Male' ORDER BY `rating` DESC LIMIT 0,10") or die(mysql_error());
if(mysql_num_rows($top_males_query) <> 0) {
while($top_males_array = mysql_fetch_array($top_males_query)) {
$top_males[] = $top_males_array;
$top_male = $top_males_array['username'][0];
echo $top_male;
}
}
I tried $top_male = $top_males_array['username'][0] But that only returns the first letter of all 10 of the top male authors ... isnt their a way to get the top author from this as well? Array Username Position 0?