Jump to content

Pagination - forget about it!


V

Recommended Posts

So far, pagination has been the most challenging.  :o I have been working 2 days on a script and still get errors. I'm following this tutorial http://net.tutsplus.com/tutorials/php/how-to-paginate-data-with-php/  also available on http://www.catchmyfame.com/2007/07/28/finally-the-simple-pagination-class/ with more explanation. I'm trying to implement the code in my comments. The entire code I'm using now is here http://www.phpriot.com/2918

 

the errors I get are

 

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\wamp\www\sitetest\comments.php on line 97

Notice: Undefined index: ipp in C:\wamp\www\gisttest\paginator.class.php on line 25

Notice: Undefined index: page in C:\wamp\www\gisttest\paginator.class.php on line 35

Notice: Undefined index: ipp in C:\wamp\www\gisttest\paginator.class.php on line 100

Notice: Undefined index: ipp in C:\wamp\www\gisttest\paginator.class.php on line 101

All Database query failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘-25,25′ at line 1

 

I realize this is a complex code (or so to me) but at least a little guidance would be greatly appreciated!

Link to comment
https://forums.phpfreaks.com/topic/204976-pagination-forget-about-it/
Share on other sites

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\wamp\www\sitetest\comments.php on line 97

 

^^^ your query failed due to an error of some kind and returned a FALSE value. You need to troubleshoot why your query is failing and your code has no error checking logic in it to test if the query worked before blindly attempting to use the results from the query (mysql_num_rows() in this case.)

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.