Ordering product by product_code error

  • Posts: 1
  • Thank you received: 0
12 years 4 weeks ago #70511

Hi to all, this is my problem:
I would like to have all product ordered by product_code but i have theese product codes:

A-100x120Mus€440D+813I9
A-78x123Mad157€650OTR6
A-90X120Caravaggio1594Ibari€988EIOR5
A-90X120Caravaggio1602CatturadiCristo€1520EFOE4
A-90X120Caravaggio1602CenainEmmaus€1410EYT-E4
A-90X120CiseriIlgiudizio€1118EHT-R5
A-98x126FM387€458E768OT-Y9

It's ok except the first but i need that the first one comes as last because it begins with A-100 that is bigger than A-90, how can i do this?

Thnx in advance,
Marco

Last edit: 12 years 4 weeks ago by HaVaNa7.

Please Log in or Create an account to join the conversation.

  • Posts: 82818
  • Thank you received: 13361
  • MODERATOR
12 years 4 weeks ago #70532

Hi,

The ordering is done automatically by MySQL. You would have to modify the sorting algorithm of MySQL and recompile MySQL with your new sorting algorithm. So you can't use the product_code field for that.

You should instead use the ordering field of each product to order them with a number.

The following user(s) said Thank You: HaVaNa7

Please Log in or Create an account to join the conversation.

Time to create page: 0.054 seconds
Powered by Kunena Forum