Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

A little help with SQL query


diddly

Recommended Posts

Posted

Hi I'm having a hard time getting this to produce a single product id row. Here's what I have:

 

"SELECT distinct p.menu_status, p.delivery_status, pd.products_name,p.products_latitude, p.products_longitude, p.products_phone, p.products_address, p.products_postal, p.products_town, p.products_province, pd.products_description, p2c.categories_id, cd.categories_name FROM products p, products_description pd, products_to_categories p2c, categories_description cd where pd.language_id = 1 and p.products_id=pd.products_id and p.products_id=p2c.products_id and cd.categories_id=p2c.categories_id and p.products_status = '1' and p2c.products_id=p.products_id and p.products_id > 455 and p.products_province = "Málaga" order by cd.categories_id"

 

Despite the pd.language_id =1, the results still produce the products with language_id other than 1 in the products_description. How do I rewrite the query to eliminate the rows not language 1. Thanks.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...