Fixed SQL error in custom order field ajax