We recently changed servers for over 70 clients and this new server is running MySQL 4.1.22. A bunch, if not all, of all queries which consist of ORDER BY statements are failing to order as they should. Below is a sample of our code that worked fine on our previous server but now is giving us problems.
Code: Select all
$query = "SELECT * FROM jobs WHERE status = 'active' ORDER BY 'date_full' DESC";
$result = mysql_query($query) or die (mysql_error());
I believe I have pinpointed the issue to the 'date_full' DESC part as if I remove the single quotes or replace the single quotes with `, the query works properly.
My problem is that we have alot of clients and we've used this type of query for a ton of sites. Before I go through each and every site to remove the single quotes, is there any other solution? Please tell me there is... updating all of these sites would be a horrid task.