$key = "ace' or 1=1 "; select id,name from user where 1 AND (user.name like "%{$key}%" OR user.id = 1 ) AND user.age= 22