- Posts: 1
- Thank you received: 0
Ordering product by product_code error
14 years 2 weeks ago - 14 years 2 weeks ago #70511
by HaVaNa7
Ordering product by product_code error was created by HaVaNa7
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
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: 14 years 2 weeks ago by HaVaNa7.
Please Log in or Create an account to join the conversation.
14 years 2 weeks ago #70532
by nicolas
Replied by nicolas on topic Re: Ordering product by product_code error
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 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.047 seconds