如题

解决方案 »

  1.   


    $sql = "select id from table where 字段='数据'";$result = mysql_query($sql,$db);$num = mysql_num_rows($result);if($num != 0){
      echo "数据存在";
    }
    else{
      echo "数据不存在";
    }mysql_close($db);
      

  2.   

    为啥要加上
    $result = mysql_query($sql,$db); $num = mysql_num_rows($result); ??
    在网上查了一下,就是这里不太理解
      

  3.   

    CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name
      

  4.   

    declare _a int ;select count(*) into _a
    from tablename
    where con;
    IF (_a> 0) THEN
      存在;
    else
      不存在;
      

  5.   

    where con; 是什么意思啊?还有,select into 是??谢谢帅哥:)
      

  6.   

    算了,你有手册吧,自己去看好了! where 条件