Hello,

my while loop is not working properly. its not considering my first row value. from second row value its working fine. it just strange. can anyone please have look on my code and tell me what is wrong in there.

here is my code:
PHP Code:
<?
$sqlpage    
$op->runsql("SELECT  a.username,a.avatar,r.visitor_id,r.visiting_count,TIMESTAMPDIFF(MINUTE, r.recent_visited, NOW()) AS MinsSinceLastVisit FROM recent_visitor as r ,author as a WHERE (r.visitor_id = a.id) AND r.profile_owner = '$uid' ORDER BY r.recent_visited DESC  LIMIT $start$limit_value");
 if(
mysql_num_rows($sqlpage) > 0){
?>
<p class="msgText">Total <strong><?=$total_records;?></strong><?if($total_records >1){
?> Recent Visitor's<?}else{?> Recent Visitor<?}}?></p>
<?
                      
if(mysql_num_rows($sqlpage) > 0){

       while(
$row1 $op->select($sqlpage)){
       
$imagearr explode(",",$row1['avatar']);
        
$imagearr[0]= preg_replace("/\/avatar\//","/small/"$imagearr[0]);



      
?>
      <a href='/profile/<?=$blog->spacereplace($row1['username']);?>/' title="<?=$row1['username']?>"><img src="<?=$retpath;?>/<?=$imagearr[0];?>" width="40" height="40" alt="<?=$row1['username']?>"/></a>
      <?


            $Ymin 
60 24 365;
            
$Mmin 60 24 30;
            
$Wmin 60 24 7;
            
$Dmin 60 24;
            
$Hmin 60;

            
$Y = (int)($minutes_dif $Ymin);
            
$minutes_dif $minutes_dif &#37; $Ymin;

            
$MON = (int)($minutes_dif $Mmin);
            
$minutes_dif $minutes_dif $Mmin;

            
$W = (int)($minutes_dif $Wmin);
            
$minutes_dif $minutes_dif $Wmin;

            
$D = (int)($minutes_dif $Dmin);
            
$minutes_dif $minutes_dif $Dmin;

            
$H = (int)($minutes_dif $Hmin);
            
$minutes_dif $minutes_dif $Hmin;

            if(
$Y ){
                  echo 
"$Y year(s) ";

                  }else if(
$MON 0){
                  echo 
"$MON month(s) ";
                  }
                  else if(
$W 0){
                  echo 
"$W week(s) ";
                  }
                  else if(
$D 0){
                  echo 
"$D day(s) ";
                  }
                  else if(
$H 0){

                  echo 
"$H hour(s) ";
                  }
                  else if(
$minutes_dif 0){

                  echo 
"$minutes_dif minute(s) ";
                  }
      echo 
"ago";  ?>(<?=$row1['visiting_count']?>visits)<? echo"\t";
             
$i++; }
               }

?>
when i echoed my query, i found that my database table is like this
username visitor_id visiting_count MinsSinceLastVisit
nehapi 12 23 0
sidharth 15 26 21
manoj 11 35 27
kaushal 10 27 961
nanda 9 15 1112
For the first row my last column value(MinsSinceLastVisit)is not increasing .it means my first value is not changing only.any suggestion?


thanks in advance.