This topic is locked
[SOLVED]

 Custom Sort Order

3/26/2015 7:06:36 PM
PHPRunner General questions
S
salus1 authorDevClub member

Is there a way to have a column heading control sort values by a predefined ordered list of values in non-alphabetical order?
For instance in the Clarity column in the database at http://www.jewelfacts.com/diamonds/inventory_list.php?orderby=aClarity the values are sorted alphabetically but I would really like them to sort in this order...
Flawless

Internally Flawless

VVS1

VVS2

VS1

VS2

SI1

SI2

I1

I2

I3
Thanks in advance for any assistance.

Sergey Kornilov admin 3/27/2015

No, it's not possible. Database must sort data by the value of one of fields.
The best you can do is to add an additional field to the database named CustomSort and specify custom number for each record. If you sort your data by CustomSort field it will give you what you want but this can be applied to initial sort order only, the one that you set right in PHPRunner.