deansaddigh Posted December 3, 2009 Share Posted December 3, 2009 I want to order my products by the last 10 products entered. hears my sql code $query = "select product.ProductID, product.ProductName, product.ProductCategory, product.ProductPrice, product.ProductQuantity, product.ProductDescription, image.ImageID, image.ImagePath, image.ImageName, product_image.ImageID, product_image.ProductID FROM product JOIN product_image ON product.ProductID = product_image.ProductID JOIN image ON image.ImageID = product_image.ImageID"; How can i do this Quote Link to comment https://forums.phpfreaks.com/topic/183847-order-by/ Share on other sites More sharing options...
cags Posted December 3, 2009 Share Posted December 3, 2009 ORDER BY product.ProductID DESC LIMIT 10 ? Quote Link to comment https://forums.phpfreaks.com/topic/183847-order-by/#findComment-970444 Share on other sites More sharing options...
deansaddigh Posted December 3, 2009 Author Share Posted December 3, 2009 Thank youuuuuuu Quote Link to comment https://forums.phpfreaks.com/topic/183847-order-by/#findComment-970455 Share on other sites More sharing options...
cags Posted December 3, 2009 Share Posted December 3, 2009 Don't forget to click 'Mark Solved' (button at the bottom left corner of threads you start). Quote Link to comment https://forums.phpfreaks.com/topic/183847-order-by/#findComment-970461 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.