Hy ihave this phpcode, how can i paginate this?to make more pages from the sql results... because i have a lots of rows...

<?php
$qry=mysql_query("SELECT *,replace(category, ',', ' ') as category FROM articles ORDER by articles.id DESC ", $con);
if(!$qry)
{
die("Query Failed: ". mysql_error());
}


/* Fetching data from the field "title" */
while($row=mysql_fetch_array($qry))
{
echo "<div class='table-responsive'>";
echo "<div class='col-sm-4 invoice-col'><address>Giorno di inserimento: ".$row['date']." <br>Inserito da: ".$row['utente']." <br>Numero: ".$row['id']." <br></address></div>";
echo "<table class='table table-primary mb30'><thead><tr><th><b>Nome: ".$row['category']."</b></th><th>Caricati</th><th>Scaricati</th><th>Differenza</th></tr></thead><tr><td>Carrelli con piastra luc.ROSSO</td><td>".$row['Carl']."</td><td>".$row['carl2']."</td><td>".$row['q6']."</td></tr><tr><td>Carrelli con piastra luc.NERO</td><td>".$row['CarrelliCC']."</td><td>".$row['CarrelliCC2']."</td><td>".$row['q1']."</td></tr><tr><td>Carelli - senza piastra</td><td>".$row['Carrelli']."</td><td>".$row['Carrelli2']."</td><td>".$row['q2']."</td></tr><tr><td>Ripiani</td><td>".$row['Ripiani']."</td><td>".$row['Ripiani2']."</td><td>".$row['q3']."</td></tr><tr><td>Prolunghe</td><td>".$row['Prolunghe']."</td><td>".$row['Prolunghe2']."</td><td>".$row['q4']."</td></tr><tr><td>Doppie Prolunghe</td><td>".$row['DoppieProlunghe']."</td><td>".$row['DoppieProlunghe2']."</td><td>".$row['q5']."</td></tr></table></div>";

}
?>

There are a lot of PHP threads about pagination already. If you do a search, you'll sure to find one that can put you on the right track.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.