On Thu, December 29, 2005 7:26 am, sunaram patir wrote: > could you please tell me what is the problem with this query > mysql_query("SELECT * FROM mailbox WHERE read=''"); Nope. Because on the face of it, there is NOTHING wrong with the query written above, per se. > i always get this warning: > Warning: mysql_num_rows(): supplied argument is not a valid MySQL > result resource in index.php on line 24 While *I* can't tell you what is wrong, and nobody on this entire list could tell you what is wrong, MySQL and PHP are just BEGGING to tell you what's wrong: $result = mysql_query($query) or die(mysql_error()); http://php.net/mysql_error Actually, there *IS* one obvious thing "wrong" with the query: You used "SELECT * " and that is a horrible horrible habit to get into. Don't do it. Name the columns you actually want. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php