SELECT * FROM gx_notice WHERE IF(seestate=1,kjfwid LIKE ‘%85a8f53e59ac4dfd89fd315012a016a8%‘,1=1 )
还有一种简单的写法 SELECT * FROM gx_notice WHERE 1=1 AND seestate=0 OR kjfwid LIKE ‘%85a8f53e59ac4dfd89fd315012a016a8%‘
原文:https://www.cnblogs.com/wangSoft/p/12269928.html