目录

更新记录


函数名称

dbUpdate($table, $cond, $update);

参数说明

$table 表名。
$cond 条件。
$update 更新数据。

调用示例

function my_db_update(){

    //定义更新后的数据数组,当然你也可以通过传参传输过来

    $update = array('username'=>'admin888','password'=>'admin888');

    //将ID=2的通行证的用户名和密码修改为:admin888

    $r = dbUpdate('user',['id'=>2],$update);

    return $r;

}