mysqli


$mysqli = mysqli_init();   //初始化mysqli    
$mysqli->options(MYSQLI_OPT_CONNECT_TIMEOUT, 2);//设置超时时间
$mysqli->real_connect('127.0.0.1', 'root', '', 'test');
$mysqli->query("SET NAMES utf8"); //设置字符集

$sql = "insert into limove(`name`, `order`) values('aa', 11)";
$rst = $mysqli->query($sql);

$sql = "delete from limove where id = 221";
$rst = $mysqli->query($sql);
$rst->fetch_all(); //一维关联数据

posted @   太空刘  阅读(119)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示