na"/> na">

Home >Backend Development >PHP Tutorial > 求教一个小疑点

求教一个小疑点

WBOY
WBOYOriginal
2016-06-13 13:45:38869browse

求教一个小问题


------解决方案--------------------
$a="select * from aa limit 2";
$result=mysql_query($a);

while($rs=mysql_fetch_object($result))
{
//加入你的表字段名为name和sex
echo $rs->name;
echo $rs->sex;

}

= 号 不是赋值号吗?-------------------------是赋值 但有字段和数组之分

mysql_fetch_object($result)--------------指针查询到一行数据后会自动向下一行移动,直到取出全部数据

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn