kts Posted December 28, 2007 Share Posted December 28, 2007 I'm trying to get the where clause to respond only where the categories_id is similiar to the $cPath variable I'm sending. It works without the where clause, and I have it all included, so im not sure why it won't allow for this where clause. <?php $cquery = "SELECT products.products_id, products.products_price, products.products_quantity, products.products_image, products.products_status, products_description.products_name, products_description.products_description, products_description.language_id, products.manufacturers_id, products_to_categories.categories_id, categories_description.categories_name FROM products JOIN products_description ON (products.products_id = products_description.products_id) JOIN products_to_categories ON (products_description.products_id = products_to_categories.products_id) JOIN categories_description ON (products_to_categories.categories_id = categories_description.categories_id) where products_to_categories.categories_id = $cPath"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/83470-solved-syntax-error-on-a-multiple-left-join-with-a-where-clause/ Share on other sites More sharing options...
kts Posted December 28, 2007 Author Share Posted December 28, 2007 '$cPath' is the answer for referrance. Quote Link to comment https://forums.phpfreaks.com/topic/83470-solved-syntax-error-on-a-multiple-left-join-with-a-where-clause/#findComment-424662 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.