I have a simple script that should get information from a database and it works fine, but im trying to get it to display something else when there is nothing to display from the database... i have tryied a few thing but i can't seem to get it to do so.... can someone give me a hand? please. It is greatly appreciated...
The following code seems to work when there is no data to display, but it also displays the text when there is something there... how can i fix this?
$query = "SELECT * FROM information ORDER BY date, time";
$result = mysql_query($query);
while($row = mysql_fetch_assoc($result))
if ($row['date'] >= date('Y-m-d'))
echo "there is nothing to display";