关于PDO类无法访问Fetch()函数问题? <?php$db=new PDO("mysql:host=localhost;dbname=test","root","");$db->query("set names GBK");$rs=$db->query("select * from `reg`");while ($rs=$db->fetch()){ print_r($rs);}?>我想问下大家为什么PDO类无法访问Fetch()函数,我用的是php5以上版本,有内置PDO类。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 while ($row=$rs->fetch()){ print_r($row);}$rs=$db->query("select * from `reg`");这个 $rs 是一个 PDOStatement 对象,而 fetch 是他的方法 <?php$db=new PDO("mysql:host=localhost;dbname=test","root","");$db->query("set names GBK");$rs=$db->query("select * from `reg`");while ($row=$rs->fetch()){ print_r($row);}?> aptana的php插件安装问题 怎样获取checkbox复选框的所有值 怎么让外网访问局域网中的一台机器 200分帮我看看这个,谢谢了 任务管理,工作笔记 开源系统推荐 这样的网址如何做的重定向 item_detail-db1-beb15c9879259f7c4a367324d78b7b31.jhtml PHP怎么快速找出字符串中匹配的字符(不能用正则) 急??谁有PHP即时到账接口财付通接口 php连接mysql概率性连接不上2002错识 127.0.0.1和192.168.9.2的区别,求解释 用PHP怎么实现实现新闻发布呢? 请教:php中的全局变量是如何被赋值的
{
print_r($row);
}$rs=$db->query("select * from `reg`");
这个 $rs 是一个 PDOStatement 对象,而 fetch 是他的方法
<?php
$db=new PDO("mysql:host=localhost;dbname=test","root","");
$db->query("set names GBK");
$rs=$db->query("select * from `reg`");
while ($row=$rs->fetch())
{
print_r($row);
}
?>