Closed tmblog closed 9 years ago
It can yeah - what errors exactly are you getting?
Thanks for the quick reply. Well the first page is fine, Im using default config on changed the url structure as above. Here's the errors.
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 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 '-6, 6' at line 1' in /home/#####/public_html/inc/pagination.php:376 Stack trace: #0 /home/####/public_html/inc/pagination.php(376): PDOStatement->execute() #1 /home/######/public_html/inc/pagination.php(202): pagination->excecute_query() #2 /home/######/public_html/inc/pagination.php(162): pagination->run('page', 'SELECT pic_id,p...', Array) #3 /home/#####/public_html/test.php(44): pagination->__construct('page', 'SELECT pic_id,p...', Array) #4 {main} thrown in /home/#######/public_html/inc/pagination.php on line 376
And how are you passing the page number variable? Have you verified it contains your page number?
Yes the links look like this
/test/page/1 /test/page/2
ok if i take out the page it works fine!
Sorry I meant how are you passing the number in your URL to the pagination method, have you verified that you are passing the correct thing?
Ye thanks for the pointer! all sorted! :-)
Excellent!
I'm using it with rewritten urls like this:
/test/page/1 etc $options = array( 'results_per_page' => 6, 'url' => 'http://example.com/test/page/*VAR*', 'db_handle' => $conn );
But I get errors, Can this be used with rewritten urls? Works fine without it.