NYCPHP Meetup

NYPHP.org

[nycphp-talk] Error involving inner SELECT using mySQL - HELP

Jeff Siegel jsiegel1 at optonline.net
Sun Sep 21 13:46:37 EDT 2003


You need at least ver. 4.1 of mySql. You may also be able to rewrite it.
See: http://www.mysql.com/doc/en/ANSI_diff_Subqueries.html
 
Jeff Siegel

-----Original Message-----
From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]
On Behalf Of Phil Powell
Sent: Sunday, September 21, 2003 11:54 AM
To: NYPHP Talk
Subject: [nycphp-talk] Error involving inner SELECT using mySQL - HELP


Ok guys, here we go again!
 
SELECT s.nnet_produkt_storrelse_navn 
FROM nnet_produkt_storrelse s, nnet_produkt_varegruppe v,
nnet_storrelse_varegruppe_assoc sv 
WHERE s.nnet_produkt_storrelse.id = sv.nnet_produkt_storrelse id 
 AND sv.nnet_produkt_varegruppe_id = v.nnet_produkt_varegruppe_id 
 AND sv.nnet_produkt_varegruppe_id IN (
   SELECT nnet_produkt_varegruppe_id 
   FROM nnet_produkt_varegruppe
   WHERE nnet_produkt_varegruppe_code =  'FLU17' 
 )
 AND s.nnet_produkt_storrelse_id > 1
 
This produces the following error:
 
You have an error in your SQL syntax near 'id AND
sv.nnet_produkt_varegruppe_id = v.nnet_produkt_varegruppe_id AND
sv.nnet_' at line 1
 
I don't see anything wrong with this query, it's standard inner SELECT
stuff!  I need help... again!
 
Phil

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20030921/4946af34/attachment.html>


More information about the talk mailing list