note 59509 added to function.mysql-num-rows
| From: | Jonas at osu1 dot php dot net | Date: | Thu, 08 Dec 2005 21:55:06 +0000 |
| Subject: | note 59509 added to function.mysql-num-rows | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-99775@lists.php.net to get a copy of this message | ||
A small tip concerning SQL_CALC_FOUND_ROWS and FOUND_ROWS()
Remember that you can us "AS" when working with mysql_fetch_assoc.
$sql="
SELECT
FOUND_ROWS() AS
found_rows;
";
$result = mysql_query($sql);
$myrow = mysql_fetch_assoc($result);
$row_count = $myrow['found_rows'];
echo $row_count;
----
Manual Page -- http://www.php.net/manual/en/function.mysql-num-rows.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+59509
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+59509&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+59509&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+59509&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+59509&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+59509&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+59509&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+59509&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+59509&report=yes
Search -- http://master.php.net/manage/user-notes.php