query($sql); ////////">
时间:2021-07-01 10:21:17 帮助过:25人阅读
$rs= $db->query($sql); ////////遍历RS
print_r($rs);
贴出结果
array(33) (
[0] => array(1) (
[column_name] => (string) ID
)
[1] => array(1) (
[column_name] => (string) UserName
)
[2] => array(1) (
[column_name] => (string) PSW
)
[3] => array(1) (
[column_name] => (string) NickName
)
print不知道在哪看结果,鼠标移动过去显示这些东西的值
我的语句就是查询某个表的所有列的名称,然后把名称取出来再加工
foreach ($rs as $value)
{
echo $value['column_name'];
}
OK了,谢谢大神