<?php
$mysqli=new mysqli("localhost","root","12345","student");
$query="select * from person";
$result=$mysqli->query("$query");
if($result){
while($obj=$result->fetch_object()){
var_dump($obj);echo "<br/>\n";
}}else{
echo "查询失败";
}
$result->free();
$mysqli->close();
?>
$mysqli=new mysqli("localhost","root","12345","student");
$query="select * from person";
$result=$mysqli->query("$query");
if($result){
while($obj=$result->fetch_object()){
var_dump($obj);echo "<br/>\n";
}}else{
echo "查询失败";
}
$result->free();
$mysqli->close();
?>
//。
}
else {
echo $mysqli->error;//把错误输出看看
}
'截至2012-10-12 14:23:49 用户结帖率0.00% 当您的问题得到解答后请及时结贴.
http://topic.csdn.net/u/20090501/15/7548d251-aec2-4975-a9bf-ca09a5551ba5.html