I doubt there is, but I was just wondering if I can apply a suffix directly to a date number in my MySQL query, rather than have to attack it again with PHP? In other words, I am currently querying
DATE_FORMAT(Date,"%d %b %y")
Which gives me 13 Jul 12. Can I get a query that would serve up 13th Jul 12?
If not, what is the most efficient way of applying a suffix? At the moment, I am exploding the string into an array, running the day variable through a function to apply the correct suffix, then concatenating all the variables together again.
Try
From the MySQL manual for DATE_FORMAT:
%D Day of the month with English suffix (0th, 1st, 2nd, 3rd, …)