Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

MySQL 'Order by' problem.... I think.


abstrakt

Recommended Posts

Posted

Hello, I hope I have posted this in the right section.

 

I am running a printing store, and I have products thats titles start with the quantity... which is in the thousands. I searched the forum as best I could and haven't fond an answer. I need them to sort in the right order, but I am not fully aware of how to do that. I need it to be in numerical order.(i.e. 5,000 / 10,000 / 15,000) etc..

 

Please see my example and help if you can.

prod_table_sample.gif

 

Thank you

Any help is greatly appreciated. :D

Posted

The problem is that the list gets sorted alphebetically which messes up your sort order.

 

Can't you define the product as 'uv Business Cards' and make the number of cards/ per package an attribute of the product? This might make more sense anyway, because the products are the same anyway?

 

Cheers,

Rob

Posted

If it is alphabetically then why is it sorting them in the order it is ? It look numerical by the first number only to me. I'd like to be able to keep it the way it is now and have it sort like I explained above. I appreciate your help, does anyone have an exact solution though ?

 

Thank you

Posted

Because you use numbers and letters as a title it is not possible to sort numerically.

So every number is trated as a seperate letter of a word, I think the sort order in that case is 0-9A-Z.

 

Hope this clears it up.

Rob

Posted
Dang, that does clear it up. Thank you, much. :D

We aim to please.

 

Good luck,

Rob

Archived

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

×
×
  • Create New...