I have a simple query that brings the results and assembles a table and I wanted the table to come with a pagination: (), but I do not know how to do it.
The query looks like this:
$nome=$_GET['nome'];
if($nome!=''){
$filtronome = " WHERE nome LIKE '%{$nome}%' ";
}else{
$filtronome = "";
}
$query = ("SELECT * FROM lancamentos ".$filtronome);
$db -> setQuery($query);
$results = $db -> loadObjectList();
echo '<table>
<thead>
<tr>
<td>ID</td>
<td>Nome</td>
</tr>
</thead>
<tbody>';
foreach($results as $r){
echo '<tr>';
echo '<td>'.$r->id.'</td>';
echo '<td>'.$r->nome.'</td>';
echo '</tr>'
}
echo '</tbody></table>';