Re: Quick question about no result

From: Date: Thu, 15 Nov 2001 17:11:07 +0000
Subject: Re: Quick question about no result
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-74744@lists.php.net to get a copy of this message
Dan McCullough wrote: > I want to show a default piece of information if my query returns no > result, and what I mean by no result is the query for a store in a certain > state doesnt exist. http://php.net/mysql_num_rows (Or sybase_num_rows, or odbc_num_rows, or whatever your database is.) If 0 rows were returned, you print your message. <?php if (mysql_num_rows($result) == 0){ echo "No stores found"; } ?> -- Like music? http://l-i-e.com/artists.htm

« previous php.general (#74744) next »