Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Error in /catalog/products_new.php


purple-circle

Recommended Posts

Posted

I've heavily modified the osCommerce system using a lot of contributions. The site works fine except it throws a SQL error on /catalog/products_new.php.

 

The error shown on the page in the browser is -

1064 - You have an error in your SQL syntax near 'where p.products_status = '1' and p.products_id = pd.products_id and pd.language' at line 1

select count(*) as total from products p left join products_description pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '1'

[TEP STOP]

 

As I know nothing about SQL statements, I'm lost. The actual statement in the products_new.php page is -

 ?$products_new_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added DESC, pd.products_name";

 

Any help would be truly appreciated. the site is at www.feather.com.au and the page throwing the error is - www.feather.com.au/catalog/products_new.php

 

Thank you.

Posted

I'd totally removed the manufacturers code from every where else in the application but the SQL statement here was still looking for references to the manufacturers table. Through trial and error, I removed the part of the statement that was causing it and it's now working.

 

I won't post the resultant code here because it is heavily modified from standard and may be confusing.

Archived

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

×
×
  • Create New...