osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

limiting products properly in products_new

This is a discussion on limiting products properly in products_new within the osCommerce 2.2 Modification Help forums, part of the osCommerce 2.2 Forums category; Hi, [I wouldn't be surprised if this query has been delt with a million times but my luck I can't ...


Go Back   osCommerce and osCMax shopping cart software forums > osCommerce 2.2 Forums > osCommerce 2.2 Modification Help

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 06-10-2005, 04:48 AM
Lurker
 
Join Date: Dec 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
ganz_friedrich
Default limiting products properly in products_new

Hi,

[I wouldn't be surprised if this query has been delt with a million times but my luck I can't find one - so apologies in advance]

I want to limit the products in products_new.php to the last 20 products added. However simply applying the limit at the end of the query causes a problem because another limit is made immediately after due to the page splitting class.

The error is:

Quote:
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 'limit 0, 10' at line 1

select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name from products p left join manufacturers m on (p.manufacturers_id = m.manufacturers_id), products_description pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '1' order by p.products_date_added DESC, pd.products_name limit 0, 20 limit 0, 10
(by the way, originally the products are limited to the current month - in any year. So if you added products in June last year then they'll be listed today).

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Limiting One per Customer Aza osCommerce 2.2 Modification Help 2 09-06-2005 01:07 PM
help, code not parsing out properly. loba osCMax v1.7 Discussion 1 03-21-2005 06:58 PM
Limiting one item per customer - narrowed to actions in head Anonymous osCommerce 2.2 Modification Help 3 03-29-2004 01:33 AM
limiting UPS shipping options superman osCommerce 2.2 Modification Help 0 11-11-2003 09:57 AM
pages don't display properly using a MAC starchild osCommerce 2.2 Modification Help 3 05-21-2003 05:06 AM


All times are GMT -8. The time now is 05:51 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax