[prog] MySQL & 'IN'

Terri Oda terri at zone12.com
Sat Jul 17 12:50:32 EST 2004


On Jul 17, 2004, at 10:17 AM, Karine Proot wrote:
> #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 tst_id_sbt AS sbt_id
> FROM types_subtypes ) LIMIT 0, 30'

Which version of MySQL are you using?  Sub-select statements haven't 
been available in mysql for very long, I don't think, so make extra 
sure that the version you're using is one that supports them.  (I tend 
to look at the docs online because I like the user comments, which 
leads me to occasionally choose the wrong syntax.  If you're looking at 
the docs locally, this probably isn't your problem.)

Have you tried this query as two queries to see if that works?  (eg: 
query #1 to make a temporary table with the data from types_subtypes, 
query #2 from that table.)

  Terri



More information about the Programming mailing list