NYCPHP Meetup

NYPHP.org

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

David Rydell drydell at worldnet.att.net
Mon Sep 22 10:23:29 EDT 2003


there have been many responses to this, but nobody seemed to notice that
Phil is missing the underscore in sv.nnet_produkt_storrelse_id

the error message is quite specific about not understanding what 'id' is...
  -----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 12:54 PM
  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

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.516 / Virus Database: 313 - Release Date: 9/1/2003
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20030922/ba40dd49/attachment.html>


More information about the talk mailing list