Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

oscommerce-2.2rc2a and mysql v5.1


lhi10

Recommended Posts

Hi,

I have installed the version oscommerce-2.2rc2a and mysql 5.1.

When call the index.php under /catalog folder I am receiving the error

 

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use 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

 

Does anyone knows how to fix the problem or the download which version of mysql?

Thank you.

Link to comment
Share on other sites

Check your database's configuration table to see if MAX_RANDOM_SELECT_NEW is defined. If not, go into phpMyAdmin and add it:

INSERT INTO configuration 
(configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added)
VALUES 
('Selection of Random New Products', 'MAX_RANDOM_SELECT_NEW', '10', 'How many records to select from to choose one random new product to display', '3', '11', now());

This definition is taken from the oscommerce.sql file. Was this an upgrade from an earlier MySQL version, or a fresh installation onto MySQL 5? Does the rest of the database seem to be there?

 

By the way, osC 2.2RC2a is out of date (even though it should be compatible with your MySQL version). For a new store you should seriously consider 2.3.1.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...