Re: Sql results

From: Date: Sun, 31 Mar 2002 05:29:12 +0000
Subject: Re: Sql results
Groups: php.general 
Request: Send a blank email to php-general+get-90863@lists.php.net to get a copy of this message
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 <php-general@gremlins.com.hk> Reply-To: php-general@lists.php.net To: php-general@lists.php.net 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

« previous php.general (#90863) next »