I need to find out the largest number in a column and I thought this would work. What could I be doing wrong? Thanks for your help.
<?
mysql_connect("localhost","name","pass");
mysql_select_db("MyDatabase");
$result = mysql_query("SELECT MAX(count_visits) FROM artist");
//grab all the content
while($r=mysql_fetch_array($result))
{
$profile_views=$r["count_visits"];
//display the row
echo "<FONT size=2><center><font color=#000000>Profile Views: $profile_views</font></center>";
}
?>