sorting array after mysql query

Discussion in 'PHP' started by Rahul Bose, Jul 10, 2010.

  1. #1
    I have a mysql query that works:

    This worked and showed the company alphabetically. Now however I have encrypted the database so now it is sorted by the encryption first letter rather than the decrypted text later. How can I add a function to the query or sort the $productR array using my decrypt($string) function?
    I tried' order by decrypt(user_company)' but it threw an error.

    Thanks
     
    Rahul Bose, Jul 10, 2010 IP
  2. netload

    netload Member

    Messages:
    105
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    28
  3. Rainulf

    Rainulf Active Member

    Messages:
    373
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    85
    #3
    You can use the sort function to sort arrays. :) If that's what you're asking..
     
    Rainulf, Jul 11, 2010 IP