mysql_fetch_array 사용해서 출력을 할려고하는데요
본문
$sql = "select * from g4_memo";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
<? while ($row = mysql_fetch_array($result)) { ?>
<tr>
<th width=250><?=$row[me_id]?></th>
<th width=250><?=$row[me_recv_mb_id]?></th>
<th width=250><?=$row[add_enter_date]?></th>
<th width=250><?=$row[me_recv_mb_id]?></th>
<th width=250><?=$row[add_enter_date]?></th>
</tr>
<? } ?>
가장 최근 한줄이 계속 출력이 안됩니다...
레코드 갯수는 정확히 출력이 되는데
$row = mysql_fetch_array($result); 를 사용해서 하면 가장 최근 레코드 한 줄이 출력이 안됩니다...
정렬을 역순으로 하면 가장 마지막 한줄이 안나오고요....
문제가 먼가요?????
답변 1
$sql = "select * from g4_memo";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
<? while ($row = mysql_fetch_array($result)) { ?>
<tr>
<th width=250><?=$row[me_id]?></th>
<th width=250><?=$row[me_recv_mb_id]?></th>
<th width=250><?=$row[add_enter_date]?></th>
<th width=250><?=$row[me_recv_mb_id]?></th>
<th width=250><?=$row[add_enter_date]?></th>
</tr>
<? } ?>
진하게 칠한 걸 빼세요.
저기에서 하나를 먹고 들어가니까 계속 하나가 빠지는 것입니다.
답변을 작성하시기 전에 로그인 해주세요.