请教怎么用PHP查询mysql返回的值

WBOY
Release: 2016-06-13 11:49:46
Original
992 people have browsed it

请问如何用PHP查询mysql返回的值
比如我是查询的多少条 select count(*) from csdn;

在mysql里面是直接返回的多少条,比如是2039条。

那在PHP里面我怎么样把这个结果显示到页面来

我用mysql_fetch_row 返回来的是一个数组,应该用哪个函数来实现呢。
------解决方案--------------------

$rs = mysql_query('select count(*) from csdn');<br />$row = mysql_fetch_row($rs);<br />echo $row[0];
Copy after login

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!