Getting total number of entries which meet condition php

Granto657

New Member
I have a database which contains fisheries in different regions. I am using the command below: \[code\] $sql ="SELECT region FROM table WHERE region='Fife'"; $res = mysql_query($sql) or die(mysql_error()); while($row = mysql_fetch_assoc($res)){ $total = array ($sql); echo count($total);\[/code\]This gives me (111111111111111) as an output. However i am looking for it to return (15) instead. There are currently only 15 enteries which match 'Fife'Can anyone suggest how i can improve my code to get the desired results??
 
Back
Top