I have a procedure for fetching records with a select clause with a LIMIT X,10 clause to fetch 10 recs at a time.
On my result page I hava a 'Prev, 1, 2, 3, 4, 5, ....' link at top showing no of pages of results.
On click of any page no, the procedure for fetching records is executed again only with the LIMIT x value changinh to x+10.
rest is same code.
I use the following to retun nos of rows returned :
$result = mysql_query($sql);
$rows = MYSQL_NUM_ROWS($result);
The first time this procedure is executed with x = 0 it is fine.
On click of any page no link with link code as follows
<a href=http://www.phpbuilder.com/board/archive/index.php/"http://localhost/procedure?x=Y">Pageno</a>
the procedure return a'0 is not a mysql result index' on
the line $rows = MYSQL_NUM_ROWS($result);
Why is this ?
I am a new guy on PHP, so please help even if answer is excuciatingly simple and my question that must so frustrating.
Thanx
On my result page I hava a 'Prev, 1, 2, 3, 4, 5, ....' link at top showing no of pages of results.
On click of any page no, the procedure for fetching records is executed again only with the LIMIT x value changinh to x+10.
rest is same code.
I use the following to retun nos of rows returned :
$result = mysql_query($sql);
$rows = MYSQL_NUM_ROWS($result);
The first time this procedure is executed with x = 0 it is fine.
On click of any page no link with link code as follows
<a href=http://www.phpbuilder.com/board/archive/index.php/"http://localhost/procedure?x=Y">Pageno</a>
the procedure return a'0 is not a mysql result index' on
the line $rows = MYSQL_NUM_ROWS($result);
Why is this ?
I am a new guy on PHP, so please help even if answer is excuciatingly simple and my question that must so frustrating.
Thanx