PHP使用面向对象的方式操做数据库

插入记录 <?php // 链接数据库 @$db=new mysqli('localhost','root','123','user1_test'); if($db->connect_errno)//链接成功代码为0,失败代码为1 { die('数据库链接失败: '.$db->connect_error); } // 模拟表单传入数据 $id='52'; $username='hello1';
相关文章
相关标签/搜索