최신글에서 php 반복구문 ?? 정보
최신글에서 php 반복구문 ??
관련링크
http://in-best.com/
135회 연결
본문
현재, 위 링크하단에 스라이딩에 불러오기에서 보시면 1개씩만 나오는데,
4~5개(원하는 개수)가 순차적반복으로 나오게 하는 php 구문.
기초가 없다 보니... 짜깁기의 한계를 느끼는 군요 ㅠ.ㅠ
고수님의 도움 요망합니다.
최신글 불러오기 현재설정 : <?=latest('inbest_slideset', 'free_gallery', 12);?>
latest.skin.php 에서 않되네요 :
<? for ($i=0; $i<count($list); $i++) { ?>
<? //리스트 페이지 이미지 출력
//썸네일 생성
$thumfile = "";
$thumb = $thumb_path.'/'.$list[$i][wr_id];
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
// 업로드된 파일이 이미지라면
if($list[$i][file][0][view]) {
$src = $list[$i][file][0][path]."/".$list[$i][file][0][file];
$thumb = thumbnail($src, $thumb_width, $thumb_height, 0, 1, $quality, 0, "", $filter, $noimg); // 0 그대로 2 확대
}
else { // data/cheditor --//에디터에서 삽입한 이미지
$edit_img = $list[$i]['wr_content'];
if (eregi("data/cheditor4[^<>]*\.(gif|jp[e]?g|png|bmp)", $edit_img, $tmp)) {
$src = $g4[path].'/' . $tmp[0]; // 파일명
$thumb = thumbnail($src, $thumb_width, $thumb_height, 0, 1, $quality, 0, "", $filter, $noimg); // 0 그대로 2 확대
}
}
?>
<ul class="set">
<li>
<div class="wk-content"><a href="<?=$list[$i]['href']?>"><img src="<?=$thumb?>" class='img-preview service-tipsy' title='<?=$list[$i][subject]?>' /></a></div>
</li>
</ul>
<? } ?>
4~5개(원하는 개수)가 순차적반복으로 나오게 하는 php 구문.
기초가 없다 보니... 짜깁기의 한계를 느끼는 군요 ㅠ.ㅠ
고수님의 도움 요망합니다.
최신글 불러오기 현재설정 : <?=latest('inbest_slideset', 'free_gallery', 12);?>
latest.skin.php 에서 않되네요 :
<? for ($i=0; $i<count($list); $i++) { ?>
<? //리스트 페이지 이미지 출력
//썸네일 생성
$thumfile = "";
$thumb = $thumb_path.'/'.$list[$i][wr_id];
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
// 업로드된 파일이 이미지라면
if($list[$i][file][0][view]) {
$src = $list[$i][file][0][path]."/".$list[$i][file][0][file];
$thumb = thumbnail($src, $thumb_width, $thumb_height, 0, 1, $quality, 0, "", $filter, $noimg); // 0 그대로 2 확대
}
else { // data/cheditor --//에디터에서 삽입한 이미지
$edit_img = $list[$i]['wr_content'];
if (eregi("data/cheditor4[^<>]*\.(gif|jp[e]?g|png|bmp)", $edit_img, $tmp)) {
$src = $g4[path].'/' . $tmp[0]; // 파일명
$thumb = thumbnail($src, $thumb_width, $thumb_height, 0, 1, $quality, 0, "", $filter, $noimg); // 0 그대로 2 확대
}
}
?>
<ul class="set">
<li>
<div class="wk-content"><a href="<?=$list[$i]['href']?>"><img src="<?=$thumb?>" class='img-preview service-tipsy' title='<?=$list[$i][subject]?>' /></a></div>
</li>
</ul>
<? } ?>
( select a.* , ( select sum(co_count) as co_count from g4_qa_choose where mb_id=a.mb_id and bo_table = 'g4_qa' ) as q_co_count from `g4_write_g4_qa` a where wr_parent = '257873' and wr_8 != '' and wr_is_comment = 1 and CONVERT(wr_7, UNSIGNED) >= 5 group by wr_content having max(wr_7) order by CONVERT(wr_7, UNSIGNED) desc limit 3 )
1055 : Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'sir.a.wr_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
error file : /15sir/bbs/board.php