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
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.)

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.