Time : 23:00:35 SQLSTATE[42000]: Syntax error or access violation: 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 ''A=0 DESC LIMIT ?, ?' at line 3 Raw SQL : SELECT A.no, A.best, A.insert_date, A.name, A.title, A.likes, A.hit, B.attach, B.attach_ori, B.mod_date FROM 2015_epilogue A LEFT JOIN 2015_attach B ON A.no = B.wno AND B.code = :code AND B.seq = :seq WHERE A.no > :no AND A.d_show = :show AND A.del = :del AND A.sort = :sort ORDER BY A.best ASC, A.'A=0 DESC LIMIT :startNum, :rowCount