hello all, welcome to me..

wow, it's been quite a while since the last post in this forum..
and I was hoping that someone will answer my query about pagination..
I was browsing the web and wondering about limit pagination in php n mysql, then landed in
http://www.phpsimplicity.com/tips.php?id=1First off, I would like to say thank you to
Saleh Jamal in regards to his post from that link about "limit the number of rows returned by MySQL"..
I've done everything off that link correctly, creating the "Next" and "Previous" links to works fine..
But I got a question, what if it comes to the last/first record?
eg.:I'm viewing the first row and listing all 20 data, and when I click on the Previous link using the following code:
<?PHP
//now this is the link..
echo '<a href="'.$_SERVER['PHP_SELF'].'?startrow='.($startrow-10).'">Previous</a>';
?>it returns me this error message:
"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 '-10, 20' at line 1"perhaps there must be an "if" clauses somewhere to be used, but I don't know how to do that..
I'm hoping someone could answer my query on this problem.. thank you
