int result = DbHelperSQL.ExecuteSql(sql); if (result == 1){ Response.ContentType = "text/plain";Response.Write("{success:true}");}{ elseResponse.ContentType = "text/plain";Response.Write("{success:false}"); }

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/06 07:36:59

int result = DbHelperSQL.ExecuteSql(sql); if (result == 1){ Response.ContentType = "text/plain";Response.Write("{success:true}");}{ elseResponse.ContentType = "text/plain";Response.Write("{success:false}"); }
int result = DbHelperSQL.ExecuteSql(sql);
if (result == 1)
{ Response.ContentType = "text/plain";
Response.Write("{success:true}");
}
{ else
Response.ContentType = "text/plain";
Response.Write("{success:false}"); }

int result = DbHelperSQL.ExecuteSql(sql); if (result == 1){ Response.ContentType = "text/plain";Response.Write("{success:true}");}{ elseResponse.ContentType = "text/plain";Response.Write("{success:false}"); }
else错了,应该放到 { 前面
查询结果如果等于1,返回success:true.否则返回success:false