简单的数据库操作与变量

来源:互联网 发布:apache tomcat安装教程 编辑:程序博客网 时间:2024/06/05 15:18



查询数据

$result = mysqli_query($conn,"select id,signature from tablename where name=' ".$_POST['username']." ' ");

修改数据

$result = mysqli_query($conn,"update tablename set username='$username',signature=' ".$_POST['signature']." '  where id='$uid' ");

插入数据

$result = mysqli_query($conn,"insert into tablename(phone,pass)  values(' ".$_POST['phone']." ',' ".$_POST['pass']." ')");

删除数据

$result = mysqli_query($conn,"delete from tablename where id=' ".$_POST['uid']." ' ");





 

原创粉丝点击