View Single Post
  #4 (permalink)  
Old 02-08-04, 01:26 PM
mdhall's Avatar
mdhall mdhall is offline
Aspiring Coder
 
Join Date: Oct 2003
Posts: 510
Thanks: 1
Thanked 1 Time in 1 Post
The table name you are querying ( "read" ) is the same as the db field name?

Maybe try something like this and see what you get...

function messages() {
$query = mysql_query("SELECT * FROM messages WHERE read='no'") or die (mysql_error());
$result= mysql_query($query);
$count = mysql_num_rows($result
);
if(mysql_num_rows($result) == 0){
echo("Nothing to Display!");
}
else
{
echo "$count results";
}
Reply With Quote