Hello Guest

Author Topic: numaric sort for monitor detail page  (Read 4434 times)

0 Members and 1 Guest are viewing this topic.

Offline helplakmal

  • Sr. Member
  • ****
  • Posts: 75
  • Karma: 1
    • View Profile
numaric sort for monitor detail page
« on: January 28, 2014, 02:51:34 AM »
hi,

I think ascending and descending sort in data column in "Monitor Details" should be numaric sort.because most of the time we received numeric values as data and numeric sort has greater importance than string sort in this case.so i changed few lines in code to get that and it is working fine i guess.

Code: [Select]
551c551,552
<                               $order = array('field' => 'tagente_estado.datos', 'order' => 'ASC');
---
>                               // $order = array('field' => 'tagente_estado.datos', 'order' => 'ASC');
>                               $order = array('field' => 'CAST(tagente_estado.datos AS DECIMAL(12,2))', 'order' => 'ASC');
555c556,557
<                               $order = array('field' => 'tagente_estado.datos', 'order' => 'DESC');
---
>                               // $order = array('field' => 'tagente_estado.datos', 'order' => 'DESC');
>                               $order = array('field' => 'CAST(tagente_estado.datos AS DECIMAL(12,2))', 'order' => 'DESC');

Regards