View Single Post

   
  #1 (permalink)  
Old 02-28-2008, 09:36 AM
Matthew256
 
Posts: n/a
Default Another SQL syntax problem

OK, another newbie with a dumb question. Why doesn't my query work?

SELECT pmainT.product + '.75' + woodtype.short AS SKU, psubT.ID + .75
AS id, ROUND(psubT.price * 1.65, 2) AS price,
psubT.pmain_ID + .75 AS Expr1, psubT.woodtype_ID, psubT.weight * .75 AS
weight, psubT.oldweight, psubT.turning
FROM woodtype INNER JOIN
pmainT INNER JOIN
psubT ON pmainT.ID = psubT.pmain_ID ON woodtype.ID = psubT.woodtype_ID
WHERE (pmainT.milling = 1) AND (pmainT.twosquares = 0)

MySQL said:
#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 'ON woodtype . ID = psubT . woodtype_ID WHERE ( pmainT . milling
= 1 ) AND ( pma' at line 1

Reply With Quote