有时候像这种的时候,会提示fd…后面的类型不匹配
(where id=1)
看下是否忘记加引号了,得把比较的变成字符串才行
string sql = "select fileid,filename,filetype,CreateDate,path from fileall where 1=1 ";
if (menu != null && menu != "")
{
sql += " and menuid='" + menu+"'";
}
if (find != null && find != "") {
sql += " and filename like '%" + find + "%'";
}