Re: SELECT COUNT - result from two tables
| From: | John W. Holmes | Date: | Thu, 06 Nov 2003 02:26:06 +0000 |
| Subject: | Re: SELECT COUNT - result from two tables | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-31463@lists.php.net to get a copy of this message | ||
Mark Gordon wrote:
Yes, query is definitely working without COUNT(*). Even in the most stripped down form, the query fails: $sql = "SELECT COUNT(bandid), genre FROM bands, genre"; $result=mysql_query($sql); while ($gen=mysql_fetch_row($result)) { echo $gen[1]; }Fails how? If it echos zero, it's not failing; your query just isn't returning any rows (regardless whether you think it should or not). -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com