Jump to content

[SOLVED] Syntax error on a multiple left join with a where clause


Recommended Posts

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";
?>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.