SQL query has me baffled
Posted: Fri Dec 03, 2004 9:21 pm
Now this is weird. The query:
The outcome:
Now, the way it's set up is the products table, with a buncha stuff, doesn't really matter, but the query should only pull out this product_name, description, price, and thumb_path from the products and uploads table where the product_name LIKE '%toaster%', right?!
I'm using WHERE 1 just to get the WHERE out of the way as I am using loops to construct the query.
Thanks
Code: Select all
SELECT products.product_name, products.description, products.price, uploads.thumb_path FROM products, uploads WHERE 1 AND products.product_name LIKE '%toaster%'Code: Select all
product_name description price thumb_path
Toaster Great toaster, only 300 pieces run through. Mint ... 30 members/steveo31/tools_thumb.jpg
Toaster Great toaster, only 300 pieces run through. Mint ... 30 members/CanadaMan102/toaster_thumb.jpgI'm using WHERE 1 just to get the WHERE out of the way as I am using loops to construct the query.
Thanks