Hello,
I'm working with a pagination script i found on http://www.daveismyname.com/tutorial...h-a-php-class/.

Error message received at initial start :ERROR: 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 '0,5' at line 1

I believe the problem is with the way i wrote my sql statement more specifically : $pages->get_limit()
try
{ $queue2 = $dbcon1 ->query("SELECT tbl_incident.inc_index, tbl_incident.inc_title FROM tbl_incident". $pages->get_limit());
$results = $queue2->fetchAll(PDO::FETCH_ASSOC);
} catch(PDOException $e) { echo 'ERROR: ' . $e->getMessage(); }

According to the website, this is how it should be done.
$data = $db->query('SELECT * FROM table '.$pages->get_limit());

- the class works as it shows the page links.
- as you can see below from the error message i copy/pasted on the sec. link click (page2) the page numbers do change.

ERROR: 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 '5,5' at line 1

how do i fix this?