Fix for MYSQL_QUERY_STRING, thanks to AndreasJung