Re: Problem with this query?
| From: | John Holmes | Date: | Tue, 03 Aug 2004 05:19:08 +0000 |
| Subject: | Re: Problem with this query? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-35532@lists.php.net to get a copy of this message | ||
Dylan Barber wrote:
Okay maybe its late or something but this should work, however I get this #1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT tblVideos.PerformerID FROM tblVideos WHERE 1 =1 AND tbl Anybody got a good clue whats wrong with this SQL? SELECT tblPerformers.ID, tblPerformers.StageName, tblPics.PicName FROM tblPerformers, tblPics WHERE 1 =1 AND tblPerformers.ID = tblPics.PerformerID AND tblPics.Active = 'yes' AND tblPics.Type = 'name' AND tblPerformers.ID IN ( SELECT UNIQUE tblVideos.PerformerID FROM tblVideos WHERE 1 =1 AND tblVideos.Active = 'yes') ORDER BY tblPics.ID DESC LIMIT 0 , 6What version of MySQL are you using? It looks like you're using a version that doesn't support sub selects. -- John Holmes php|architect - The magazine for PHP professionals - http://www.phparch.com