i am using this to collect comments made abt a particular user. i want to display 7 comments on each page and want to enable pagination. what would be the steps of implementation. sorry. n00b question.
$query = "SELECT msg, user_id, comment_time FROM comments WHERE aid = '$aid' ORDER BY comment_time DESC";
$result = mysql_query($query) or die("ERROR: $query.".mysql_error());
if (mysql_num_rows($result) > 0) {
while($row = mysql_fetch_object($result)){
$uidval = $row->user_id;
if ($uidval != 0){
$userInfo = $facebook->api_client->fql_query("SELECT name, pic_square_with_logo, profile_url FROM user WHERE uid='".$uidval."'");
// echo '<br>Array Info<br>';
// print_r($userInfo);
// echo '<br><br>';
$nameuser = $userInfo[0]['name'];
$pic = $userInfo[0]['pic_square_with_logo'];
$profile_url = $userInfo[0]['profile_url'];
echo '<img src="'.$pic.'" />';
echo '<a href="'.$profile_url.'">'.$nameuser.'</a>';
echo '<br>';
echo $row->comment_time;
echo '<br>';
echo $row->msg;
echo '<br>';
}
}
}