<?php
$mysqli=new mysqli("localhost","root","","demo");

if($mysqli->connect_error){
die("连接数据库失败!".$mysqli->connect_error());
}
echo "ok<br/>";

update($mysqli,"student","stuname='小明' where id=888888");
function update($tmysqli,$table,$tiaojian){

$sql="update $table set $tiaojian";
if($tmysqli->query($sql)===true){
echo "修改成功!";

}

}
update 的封装方法

?>

相关文章:

  • 2022-01-01
  • 2021-05-04
  • 2021-04-01
  • 2021-11-20
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-17
  • 2021-07-04
  • 2021-12-16
  • 2022-01-03
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案