You are here:  » Order by

Support Forum



Order by

Submitted by henk on Tue, 2007-02-20 20:26 in

Hi,

Here is a link: link

The price is orderd ok now, i want to order first by price then by maandbedrag :)

Thx

Henk

Submitted by support on Tue, 2007-02-20 20:30

Hi Henk,

Look in the SQL for:

ORDER BY price

..and if the field is called maandbedrag then you can just do this:

ORDER BY price,maandbedrag

(look in products.php)

Cheers!
David.

Submitted by henk on Tue, 2007-02-20 20:43

Thx, but 100 is lower then 25 see link

Thx
Henk

Submitted by support on Tue, 2007-02-20 20:46

Hi Henk,

The ordering looks correct for price followed by maandbedrag. You will get jumps in maandbedrag because the primary decreasing value is price.

Does this make sense?

Cheers,
David.

Submitted by henk on Tue, 2007-02-20 20:55

but it doesnt order maandbedrag correct

€100.00 - €0.00
€100.00 - €0.00
€114.00 - €0.00
€139.50 - €0.00
€150.00 - €0.00
€160.00 - €0.00
€25.00 - €0.00 here it went wrong
€27.50 - €0.00
€30.00 - €0.00

Thx Henk

Submitted by support on Tue, 2007-02-20 20:59

Hello henk,

I think this might be down to the data type in the database.

What type is maandbedrag?

Have you copied price using DECIMAL (10,2)?

Cheers,
David.

Submitted by henk on Tue, 2007-02-20 21:08

Thx :)

Henk