에이트건축

이미지 불러오기인데요. 고수님들 한번 봐주세요

$sql3 = " select bf_file, bf_datetime from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '{$wr_idvm}' and bf_type in (1,2,3) ";
$result3=mysql_query($sql3);


for($i=0 ; $row3 = mysql_fetch_array($result3) ; $i++){
$imgfileavm= "<img src =$g4[path]/data/file/$bo_table/$row3[bf_file] width=70 height=80 border=0>";
}


위의 소스는 이미지 불러오기는 하는데 좀 이상하게? 불러오네요.


1. 이미지 10개를 한꺼번에 등록하는데요 원하는건 그중 첫번째이미지만을 불러오고 싶구요.
2. 등록되지 않는 이미지는 따로 noimg.gif로 넘기고 싶습니다.

고수님들 부탁드려요^^
|

댓글 2개

동일 wr_id and bf_type 1,2,3 and bf_no 오름차순 정렬 상태 1개

$sql3 = " select bf_file, bf_datetime from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '{$wr_idvm}' and bf_type in (1,2,3) order by bf_no asc limit 1";
$result3=mysql_query($sql3);
$row3 = mysql_fetch_array($result3);

echo $imgfileavm = "<img src =$g4[path]/data/file/$bo_table/$row3[bf_file] width=70 height=80 border=0>";

테스트 해 보세요.
감사합니다^^ 첫째이미지는 잘나옵니다.^^
댓글을 작성하시려면 로그인이 필요합니다.

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
13-02-02 조회 1,734
13-02-02 조회 981
13-02-02 조회 1,727
13-02-02 조회 882
13-02-02 조회 1,658
13-02-02 조회 829
13-02-01 조회 878
13-02-01 조회 726
13-02-01 조회 856
13-02-01 조회 862
13-02-01 조회 614
13-02-01 조회 1,074
13-02-01 조회 1,074
13-02-01 조회 1,025
13-02-01 조회 1,433
13-02-01 조회 1,136
13-02-01 조회 1,708
13-02-01 조회 883
13-02-01 조회 3,479
13-02-01 조회 1,102