有这么一条sql语句
select count(*) as c from `student` WHERE 1=1 and is_display='Y' and (s_state='0')|(s_state='-1') AND (s_subject LIKE'%用户提交的数据%') ORDER BY s_id DESC如何适当地构造 提交的数据  ,以便能查到student表中的内容?

解决方案 »

  1.   

    select count(*) as c from `student` WHERE 1=1 and is_display='Y' and (s_state='0')|(s_state='-1') AND (s_subject LIKE'%1');select * from student where 'a' like '%') ORDER BY s_id DESC
      

  2.   

    不行
    MySQL Query Error
    select count(*) as c from `student` WHERE 1=1 and is_display='Y' and (s_state='0')|(s_state='-1') AND (s_subject LIKE'%%');select * from student#%') ORDER BY s_id DESC数据库是mysql