Blogger Information
Blog 6
fans 0
comment 0
visits 3796
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
pdo数据操作,3-4,0724
18年了要发呀
Original
521 people have browsed it
  1. require 'connect.php';
  2. $linshi = $dbh->prepare('UPDATE `category` SET `name` = :name, `alias`=:alias WHERE `cate_id` = :cate_id ');
  3. if($linshi->execute(['name'=>"999",'alias'=>"8888",'cate_id'=>13])){
  4. if($linshi->rowCount()>0){
  5. echo "ok".$dbh->lastInsertId();
  6. }
  7. }

预处理对象的字段名后面跟着的“预处理变量”,要和字段名一致

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post