Fixed an API sequence error getting results from MySQL query.