PHP Classes

error

Recommend this page to a friend!

      My Pagination  >  All threads  >  error  >  (Un) Subscribe thread alerts  
Subject:error
Summary:I tried this on a large mysql database
Messages:7
Author:Don Tait
Date:2011-10-09 16:28:19
Update:2011-10-30 21:07:09
 

  1. error   Reply   Report abuse  
Picture of Don Tait Don Tait - 2011-10-09 16:28:19
Warning: mysql_query() [function.mysql-query]: Unable to save result set in /home/iouguyc1/public_html/tarbaby/page.php on line 23

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/iouguyc1/public_html/tarbaby/page.php on line 24
Offset (Number of rows in a page): 3

---- 1. basic next/prev ---------------------------------------------

RESULTS

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/iouguyc1/public_html/tarbaby/page.php on line 43

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/iouguyc1/public_html/tarbaby/page.php on line 45



prev | next
Showing 1 - 3 out of 0

---- 2. Page Numbers ---------------------------------------------

RESULTS

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/iouguyc1/public_html/tarbaby/page.php on line 77

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/iouguyc1/public_html/tarbaby/page.php on line 79



prev | | next
Showing 1 - 3 out of 0

---- 3. Select Field (Drop Down) ---------------------------------------------

RESULTS

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/iouguyc1/public_html/tarbaby/page.php on line 111

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/iouguyc1/public_html/tarbaby/page.php on line 113



prev
next

Showing 1 - 3 out of 0

  2. Re: error   Reply   Report abuse  
Picture of Romil Jayme Romil Jayme - 2011-10-09 17:27:48 - In reply to message 1 from Don Tait
There might be something missing.

Can you show that section of your code?

  3. Re: error   Reply   Report abuse  
Picture of patelv98 patelv98 - 2011-10-10 10:14:29 - In reply to message 2 from Romil Jayme

nice...script it's working properly

but,my query contain values...how do i get that values on the next page...

  4. Re: error   Reply   Report abuse  
Picture of Romil Jayme Romil Jayme - 2011-10-10 11:51:56 - In reply to message 3 from patelv98
@patelv98: Thanks! You can get the values to the next page by using cookie or session. Or you can also use the GET variables but you need to have the GET parameter on the first page.

Example you will be displaying all posts submitted by a certain user and you can specify how many posts displayed per page.

like:
index.php?username=john&numposts=15

numposts - serves as your offset (number of rows per page)

The pagination displays the pages and when you proceed to the next page the URL will look like this
index.php?username=john&numposts=15&page=2

  5. Error too   Reply   Report abuse  
Picture of leonardus eko leonardus eko - 2011-10-14 04:51:34 - In reply to message 1 from Don Tait
I have error ,this messges:
Notice: Undefined index: page in C:\xampp\htdocs\my-pagination\example.php on line 40
Notice: Undefined index: id_user in C:\xampp\htdocs\my-pagination\example.php on line 47
Notice: Undefined index: user_name in C:\xampp\htdocs\my-pagination\example.php on line 47
=>
Notice: Undefined index: id_user in C:\xampp\htdocs\my-pagination\example.php on line 47
etc

  6. Re: error   Reply   Report abuse  
Picture of Romil Jayme Romil Jayme - 2011-10-14 05:15:43 - In reply to message 5 from leonardus eko
@leonardus : It seems you don't have these fields in your table. The example script uses only 1 table with 2 fields which (id_user[int], user_name[varchar]). You must also insert some records to fully test the script. Hope this helps.

  7. Re: error   Reply   Report abuse  
Picture of jose maria jose maria - 2011-10-30 21:07:10 - In reply to message 6 from Romil Jayme
need line 267. $pages='';