Re: Paginatating PHP

From: Date: Thu, 21 Dec 2006 09:18:01 +0000
Subject: Re: Paginatating PHP
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-42830@lists.php.net to get a copy of this message
Chris Carter wrote:
There is enough data to display this result and to paginate but its simply showing the
else condition which does not have NEXT or PREVIOUS hyperlinked. ... $query_count = "SELECT count(*) FROM students"; $result_count = mysql_query($query_count); $totalrows = mysql_num_rows($result_count); well, the result is always 1 (even if no students are present), you need to use some mysql_fetch_* function to get the count of students
ie. $tmp=mysql_fetch_row($result_count); $totalrows=$tmp[0]; OKi98

« previous php.db (#42830) next »