标签:
$select_re_id=$cnx->query("select count(*) c from Yid where pid=‘".$pid."‘ and gid=‘".$gid."‘ and prid=‘".$prid."‘ and cid=‘".$cid."‘ and did=‘".$did."‘");//判定是否为空 foreach($select_re_id as $reid){ if ($reid[‘c‘]==‘0‘){ $cnx->query("INSERT INTO Yid (pid,gid,prid,cid,did) VALUES (‘".$pid."‘,‘".$gid."‘,‘".$prid."‘,‘".$cid."‘,‘".$did."‘)");//添加语句 }else{ echo "此组合已经存在!"; }
标签:
原文地址:http://www.cnblogs.com/hellowzd/p/4200285.html