use it after your query to see if there is a result set. Like follows: $result = mysql_query($query) or die ("Error in query: " . mysql_error());
// if row exists -> user/pass combination is correct if (mysql_num_rows($result) == 1) { return 1; } // user/pass combination is wrong else { return 0; } >From: Jason Wong <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: [EMAIL PROTECTED] >Subject: Re: [PHP] Sql results >Date: Sun, 31 Mar 2002 13:17:29 +0800 > >On Sunday 31 March 2002 08:44, Alberto Wagner wrote: > > But I Want a way to do something if there isn't any result > >mysql_num_rows() ? > > >-- >Jason Wong -> Gremlins Associates -> www.gremlins.com.hk > >/* >The road to Hades is easy to travel. > -- Bion >*/ > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php > _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php