データベースエラーが発生しました。

Error Number: 1064

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-30,30' at line 15

SELECT snaps.id as id, title , movie, has_area, spot_id, comment , DATE_FORMAT(snaped_at,'%Y/%m/%d') AS snaped_at, is_swf, nickname as author, usr_id as author_id, users.user_category as user_category, state.st_name as state_name, or18_spots.name as spot_name, or18_spots.id as spot_id, (SELECT count(id) FROM or18_snap_comments WHERE snap = snaps.id ) AS commented, CASE WHEN has_area =1 THEN tiiki_name ELSE or18_spots.name END AS place FROM `or18_snaps` AS snaps LEFT JOIN tiiki ON tiiki_code = area LEFT JOIN or18_spots ON or18_spots.id = spot_id LEFT JOIN users ON usr_id = user LEFT JOIN state ON state.st_no = snaps.state WHERE snaps.state =20 ORDER BY snaps.created_at DESC LIMIT -30,30

Filename: /var/www/shared/ci/application/models/or18_snaps.php

Line Number: 314