<?php
try {
$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(); }
?>
长风秋雁
慕妹3242003