It seems when u load the page for the first time, the variable REQUEST['offset'] not set. This resulting your query looks like ... "LIMIT , 1" and hence giving sql error. In this case first check the value of $offset varible and if it is empty assing value 0. for example..
[PHP]if($offset=="") $offset=0;[/PHP]
Leave a comment: