Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

SQL Errors


houseoftears

Recommended Posts

Has anyone had issues with MySQL errors in several spots???

 

I have the problem in my admin section, and my catalog section as well. It's like several of the constants being used aren't defined anywhere, such as MAX_RANDOM_SELECT_NEW.

 

Am I missing something???

Link to comment
Share on other sites

for instance, when I go to www.mydomain.com/catalog, it loads, but in column_left.php, it's saying:

 

1064 - You have an error in your SQL syntax near 'MAX_RANDOM_SELECT_NEW' at line 1

 

select products_id, products_image, products_tax_class_id, products_price from products where products_status = '1' order by products_date_added desc limit MAX_RANDOM_SELECT_NEW

 

[TEP STOP]

Link to comment
Share on other sites

I have the problem in my admin section, and my catalog section as well. It's like several of the constants being used aren't defined anywhere, such as MAX_RANDOM_SELECT_NEW.

 

Am I missing something???

 

Yes, you are missing something......A define somewhere. Is this from a contribution, a fresh install????

 

BTW- Those aren't MySQL errors.

Link to comment
Share on other sites

Ok....take a look at your catalog/includes/boxes/whats_new.php and post the first line of that file. It should look like this:

 

  if ($random_product = tep_random_select("select products_id, products_image, products_tax_class_id, products_price from " . TABLE_PRODUCTS . " where products_status = '1' order by products_date_added desc limit " . MAX_RANDOM_SELECT_NEW)) {

?>

Link to comment
Share on other sites

  if ($random_product = tep_random_select("select products_id, products_image, products_tax_class_id, products_price from " . TABLE_PRODUCTS . " where products_status = '1' order by products_date_added desc limit " . MAX_RANDOM_SELECT_NEW)) {

 

ok, looks the same to me......where is that MAX_RANDOM_SELECT_NEW being set?

Link to comment
Share on other sites

Also take a look at your dB configurations table. It should have a line that looks like this:

 

39 New Products Module MAX_DISPLAY_NEW_PRODUCTS 9 Maximum number of new products to display in a category 3 5 NULL 2003-02-20 16:31:06 NULL NULL
Link to comment
Share on other sites

Archived

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

×
×
  • Create New...