I have read several of these posts on the site, but still can't find the answer to my problems. I have a while loop where for every entry in the database the table populates. Although if the table in the database is empty, I want it to display a messaged instead. Any ideas of what is wrong here? (aware of the deprecated tags)
$result = mysql_query("SELECT * FROM blog");
while($row = mysql_fetch_array($result))
{
if(count($row) === 0)
{
echo 'No Data';
}
<table code>
}