开发者

How to retrieve number of results of MySQL result in PHP?

开发者 https://www.devze.com 2022-12-14 11:12 出处:网络
$sql = 开发者_如何学Go\'select ...\'; $result = mysql_query($sql,$con); Is there a function for this?mysql_num_rows()
$sql = 开发者_如何学Go'select ...';

$result = mysql_query($sql,$con);

Is there a function for this?


mysql_num_rows()

Retrieves the number of rows from a result set. This command is only valid for statements like SELECT or SHOW that return an actual result set. To retrieve the number of rows affected by a INSERT, UPDATE, REPLACE or DELETE query, use mysql_affected_rows().

0

精彩评论

暂无评论...
验证码 换一张
取 消