SQl query running to return the total count from the query.
this code works when running SQL with PHPmyAdmin
But on the page it is not displaying echo of the count ?
Not sure if I could have overlooked something here.
Many Thanks!
$sql2=mysql_query("SELECT count(*)
FROM main_table LEFT JOIN houses ON main_table.housenumber = houses.housenumber AND main_table.streetname = houses.streetname
WHERE main_table.city='1'
group by main_table.city ORDER BY average DESC, houseID DESC, reviewID DESC;");
while($row=mysql_fetch_array($sql2))
{
$count=$row['count'];
echo $count;;
}