PHP更新數(shù)據(jù)庫(kù)記錄

字號(hào):


    //更新記錄
    $query="insert into chinachaodai (name,theindex)values ('公司','1')";
    $result=$mysqli->query($query);
    if($result)
    {
    echo ("返回行數(shù):".$mysqli->affected_rows);
    }
    else
    {
    echo("失敗了");
    }
    $mysqli->close();