Studio64
10-01-2002, 12:34 AM
I've been staring at this query for about 30 minutes now and I can't figure out whats wrong w/ the friggin syntax...
I need a 2nd pair of eyes.. It's something stupid. I just can't see it
SELECT product.ID, product.Name, product.ProductID, product_Manu.Desc, product_Price.List, product_Price.OurPrice, product.CarEngine_ID FROM product, product_Manu, product_Price WHERE product_Manu.ID= AND product_Price.ID=product.Price_ID ORDER BY `product.ProductID`ASC
Studio64
10-01-2002, 12:34 AM
BTW... All of those fields are valid table and field names.. So thats not the problem
priyadi
10-01-2002, 01:14 AM
SELECT product.ID, product.Name, product.ProductID, product_Manu.Desc, product_Price.List, product_Price.OurPrice, product.CarEngine_ID FROM product, product_Manu, product_Price WHERE product_Manu.ID= AND product_Price.ID=product.Price_ID ORDER BY `product.ProductID`ASC
Maybe that's the error you are looking for? It might be more helpful if you post the error message and your table definition.
Studio64
10-01-2002, 01:39 AM
eh... Yeah.... See... I told you it was stupid...
I've just been staring at it so long I just miss the stupid things
priyadi
10-01-2002, 04:51 AM
I suggest to reindent your SQL queries for better readability. Your above query should be written like this:
SELECT product.ID, product.Name, product.ProductID, product_Manu.Desc, product_Price.List, product_Price.OurPrice, product.CarEngine_ID
FROM product, product_Manu, product_Price
WHERE product_Manu.ID=
AND product_Price.ID=product.Price_ID
ORDER BY `product.ProductID`ASC
See? It is much easier to spot the problem. And don't worry about extra whitespaces, SQL ignores them. You can even reindent them with the rest of your PHP/Perl code.
AdminLive
10-06-2002, 01:45 AM
Sometimes we can't see syntax problems even if we have 4 pairs of eyes. LOL :D