에이트건축

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

· 2013-02-02 (토) 10:13:53 · 1721 · 2
$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개

2013-02-02 (토) 11:14:19
동일 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 질문답변

66,531건

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

+
제목 글쓴이 날짜 조회
13-02-02 조회 1,729
13-02-02 조회 974
13-02-02 조회 1,722
13-02-02 조회 876
13-02-02 조회 1,643
13-02-02 조회 819
13-02-01 조회 870
13-02-01 조회 719
13-02-01 조회 845
13-02-01 조회 856
13-02-01 조회 609
13-02-01 조회 1,043
13-02-01 조회 1,061
13-02-01 조회 1,016
13-02-01 조회 1,422
13-02-01 조회 1,131
13-02-01 조회 1,700
13-02-01 조회 876
13-02-01 조회 3,467
13-02-01 조회 1,091