I have a database which contains fisheries in different regions. I am using the command below:
$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);
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??