<?phptry {$pdo="mysql:host=localhost;port=3306;dbname=huiyuanzhuce";$mypdo=new PDO($pdo,"root","root");$mypdo->exec("set names utf8");$sql="select * from zhuce where dg_username=?";$a=$mypdo->prepare($sql);$username='wangzhe';$a->execute(array($username));$res=$a->fetch();print_r($res);}catch (PDOException $e) { print "错误: ".$e->getMessage()."<br />"; print "行号: ".$e->getLine()."<br />"; die(); }?>
- 2 回答
- 0 关注
- 122 浏览
添加回答
举报
0/150
提交
取消