Fixed a mysql query error.