Help make paginated output of all data from the database

The data should be displayed like this image and text link

<?php include ("db.php"); $result = mysql_query("SELECT avatar,id,name FROM users WHERE login='$author'",$db); $myrow = mysql_fetch_array($result); printf( "<a href='news.php?id=%s'>%s</a><a href='news.php?id=%s'><img alt='аватар' src='%s'></a>", $myrow['id'], $myrow['name'], $myrow['id'], $avatar ); 

Although I xs we can not correctly did

    1 answer 1

    maybe so?

     printf("<a href='news.php?id=%s'>%s</a><a href='news.php?id=%s'><img alt='аватар' src='%s'></a>",$myrow['id'],$myrow['name'],$myrow['id'],$myrow['avatar']); ?> 
    • Where is the connection to the database and the connection to the necessary data - bukvo278