function act_checkAddCoeff() { //添加系数中,ajax后台验证是否有相同系数名称、样本类型、样本大小记录 $cName = isset($_POST['cName']) ? $_POST['cName'] : ''; $sampleTypeId = isset($_POST['sampleTypeId']) ? post_check($_POST['sampleTypeId']) : ''; $sizeCodeId = isset($_POST['sizeCodeId']) ? post_check($_POST['sizeCodeId']) : ''; $where = "WHERE cName='{$cName}' AND sampleTypeId='{$sampleTypeId}' AND sizeCodeId='{$sizeCodeId}' "; $ret = SampleCoefficientModel::getSampleCoefficientCount($where); if ($ret === 0) { self::$errCode = "1111"; self::$errMsg = "可以使用"; } else { self::$errCode = "0000"; self::$errMsg = "不可以使用"; } }