jhdesign Posted February 14, 2006 Posted February 14, 2006 I'm no SQL expert but when viewing product_listing on my site the products are ordered like this: (I gave each product name a number and this is how it showed up). 10 1 11 12 .... 20 2 21 22.. This is wrong it should be 1,2,3,4...10,11..20,21...etc Wondering if there is a solution for this? Any help is greatly appreciated!
kgt Posted February 14, 2006 Posted February 14, 2006 Ordering should be 1 10 11 12 . . . 2 20 21 22 This is expected because product names are strings, not numbers. (For an example, create some files on your harddrive called 1.txt, 2.txt, 11.txt, 21.txt, etc. and order them by name. You should get a similar ordering because filenames are also considered strings and are ordered thus.) However, if you're really getting 10 1 11 12 . . . 20 2 21 22 I would find this rather unusual. Contributions Discount Coupon Codes Donations
jhdesign Posted February 16, 2006 Author Posted February 16, 2006 Ordering should be 1 10 11 12 . . . 2 20 21 22 This is expected because product names are strings, not numbers. (For an example, create some files on your harddrive called 1.txt, 2.txt, 11.txt, 21.txt, etc. and order them by name. You should get a similar ordering because filenames are also considered strings and are ordered thus.) However, if you're really getting 10 1 11 12 . . . 20 2 21 22 I would find this rather unusual. Thanks for this, didnt realize that. But how does OSC sort out the product on this page? (product listing). Jacob
kgt Posted February 16, 2006 Posted February 16, 2006 Thanks for this, didnt realize that. But how does OSC sort out the product on this page? (product listing). Jacob By default products name. Otherwise, by whichever column you have selected. Contributions Discount Coupon Codes Donations
edtiger Posted February 16, 2006 Posted February 16, 2006 The following forum might be useful: http://www.oscommerce.com/forums/index.php?showtopic=191869
Recommended Posts
Archived
This topic is now archived and is closed to further replies.