파일추출 질문입니다..
본문
<?php
$query = "select * from g5_board_file";
$result = sql_query($query);
$cnt=0;
while($memberName = sql_fetch_array($result)){
$img_src[$cnt]="<img src='/data/file/note/$memberName[bf_source]' style='width:100%;'>";
?>
<p><?= $img_src[$cnt]?></p>
<?php $cnt++; } ?>
코멘트에 파일첨부를 완료해서
추출을 하려고 위와 같은 코드를 사용하였습니다.
그런데 한 코멘트에 모든 이미지가 나 나와 버립니다.........
어디를 수정해야 할까요? ㅠㅠ
하루종일해서 눈에 읽히지가 않아요..
참고로
이미지의 wr_id는 comment_id로 입력했습니다..
제발 부탁드립니다.
!-->답변 1
$query
=
"select * from g5_board_file where bo_table = '{$bo_table}' and wr_id = '{$comment_id}' "
;
/view_comment.skin.php 에서 출력할 경우를 기준으로 작성된 쿼리입니다.
답변을 작성하시기 전에 로그인 해주세요.