Jump to content

Sorting Records


sseeley

Recommended Posts

Hi I currently have all my records within my database encrypted for data protection etc...when I retrieve these records, I cannot sort them A-Z using MYSQL as I do not decrypt them until they are displayed.

 

Is there an easy way of sorting records within PHP to allow me to display them in alphabetical order?

 

Many thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/148600-sorting-records/
Share on other sites

Hi

 

You could read them into a 2 dimensional array (first dimension being the record number, 2nd being the field) and then sort the array before processing them. Be fine for a limited number of records. I have done this for things like a list of users taken from multiple seperate databases.

 

All the best

 

Keith

Link to comment
https://forums.phpfreaks.com/topic/148600-sorting-records/#findComment-780359
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.