How to sort encrypted database fields using CActiveDataProvider

32 Views Asked by At
$criteria->order = 'patient_admit_details.first_name DESC';
$criteria->group = 'Patients.patient_id';
$dataProvider = new CActiveDataProvider('Patients', array('criteria'=>$criteria));

The patient's first name and last name were stored in the database using base_64 encoding. Now how can I get patients in sorted order using first_name? Sorting should be applied to original values. Is there any provision from CActiveDataProvider? I don't want to loop over every record, decrypt and sort patients.

0

There are 0 best solutions below