Query Hang

From: Date: Wed, 22 Nov 2000 09:41:39 +0000
Subject: Query Hang
Groups: php.db 
Request: Send a blank email to php-db+get-4645@lists.php.net to get a copy of this message
Hi there, I have a hanging problem with my statistical query. I am using PHP 4.0.3pl1 and mysql 3.22.32 My logic is something like.. while loop (exit after 12 months) Read current-month data with user-defined condition display current-month data (eg. number of record) current-month minus one (previous month) end-while My example: Data in Database - Dec 1999,Jan 2000 to Nov 2000 - every month has PC sales - Nov 2000 - only this month has software sales. When I do a query by PC sales, it came out fine with 12 months and the number of records. When I do a query by software sales, it will hang and the browser will display "page not found" after a few minutes. If I put in records for all the months for software sales, the query will work. How do I ignore/skip the month with zero records? Or is there any other way that I can overcome this problem?

« previous php.db (#4645) next »