Thank you for your reply. This sounds good.. I will need to learn a little about functions in MySQL, but be good learning and a much quicker way to deal with the data as its server side It will not be a UK lottery game or the like. I just need a way to sort data in the database in a different way.. HEHEHE...