I want to know how to add a pagination limit to my query.
The query without the limit.
if(!empty($sqlParts))
{
$sql = "SELECT * FROM tablename WHERE " .implode( " AND " , $sqlParts);
}
The query with the limit.
if(!empty($sqlParts))
{
$sql = "SELECT * FROM tablename WHERE " .implode( " AND " , $sqlParts) ' LIMIT ' $offset ',' $no_of_records_per_page;
}
The idea is to display a certain amount of data from my database before you can go to the next page to display the rest.
Parse error: syntax error, unexpected '' LIMIT '' - this is my error with the code above.