Mrs Minx Posted May 22, 2007 Share Posted May 22, 2007 Hi There, Thanks for reading. I had someone working on my site and under colum_right.php they had commented out the featured products code. I have just gone to un-comment it (enable it) and I am getting horrible errors! See below: 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_DISPLAY_FEATURED_PRODUCTS' at line 1 select p.products_id, p.products_image, p.products_price, p.products_tax_class_id, s.specials_new_products_price, specials_new_products_price, p.products_date_added from products p left join products_description pd on p.products_id = pd.products_id and pd.language_id = '1' left join specials s on p.products_id = s.products_id left join featured f on p.products_id = f.products_id where p.products_status = '1' and f.status = '1' order by rand() DESC limit MAX_DISPLAY_FEATURED_PRODUCTS [TEP STOP] Can anyone explain this to me in plain english please and tell me how to resolve this problem? Thanks! ---------------------------------------- Minxy :) "Keep plodding on to achieve your dreams" Link to comment Share on other sites More sharing options...
usernamenone Posted May 23, 2007 Share Posted May 23, 2007 Did you run the database.sql query included in the download? Hi There, Thanks for reading. I had someone working on my site and under colum_right.php they had commented out the featured products code. I have just gone to un-comment it (enable it) and I am getting horrible errors! See below: 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_DISPLAY_FEATURED_PRODUCTS' at line 1 select p.products_id, p.products_image, p.products_price, p.products_tax_class_id, s.specials_new_products_price, specials_new_products_price, p.products_date_added from products p left join products_description pd on p.products_id = pd.products_id and pd.language_id = '1' left join specials s on p.products_id = s.products_id left join featured f on p.products_id = f.products_id where p.products_status = '1' and f.status = '1' order by rand() DESC limit MAX_DISPLAY_FEATURED_PRODUCTS [TEP STOP] Can anyone explain this to me in plain english please and tell me how to resolve this problem? Thanks! Link to comment Share on other sites More sharing options...
sugiartha Posted May 23, 2007 Share Posted May 23, 2007 looks like a configuration key named MAX_DISPLAY_FEATURED_PRODUCTS is not in your database. for quick resolution, add this code in your catalog/includes/application_top.php file define('MAX_DISPLAY_FEATURED_PRODUCTS', 15); this is not standard oscommerce way. usually you can update this value via admin menu. Sugiartha ------------------------------------------ concept of life: enjoy aja! Link to comment Share on other sites More sharing options...
Mrs Minx Posted May 25, 2007 Author Share Posted May 25, 2007 Thanks! I put the code in (figured that it was easier than mucking about with database) and it worked a treat! You have made me so happy - thanks again :) ---------------------------------------- Minxy :) "Keep plodding on to achieve your dreams" Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.