카테고리 만드는 예제.
SQL은 파일 첨부
[code]
<?php
include("conn.php");
$cate_sql="select * from category order by groupidx asc , previdx asc , depthidx asc";
$cate_result=mysqli_query($conn,$cate_sql);
$cate_total=mysqli_num_rows($cate_result);
if($cate_total < 1 ) {}
else {
echo "<div>";
while($cates=mysqli_fetch_assoc($cate_result)) {
$prevtitle=stripslashes($cates['prevtitle']);
$previd=stripslashes($cates['previd']);
$depthtitle=stripslashes($cates['depthtitle']);
$depthid=stripslashes($cates['depthid']);
$previdx=stripslashes($cates['previdx']);
$depthidx=stripslashes($cates['depthidx']);
if(($depthidx < 1) || ($depthidx == false || null) || empty($depthidx)) {
echo "- 2<a href=$previd>$prevtitle</a>-</div>";}
if(($previdx >=1) && ($depthidx >=1)) {
echo "<pre>1- $depthtitle - $depthid - </pre>";
}
else{}
}
}
?>
[/code]
게시판 목록
개발자팁
질문은 QA에서 해주시기 바랍니다.
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 5186 | PHP |
swallow
|
2년 전 | 939 | |
| 5185 | PHP |
swallow
|
2년 전 | 960 | |
| 5184 | PHP |
swallow
|
2년 전 | 534 | |
| 5183 | PHP |
swallow
|
2년 전 | 834 | |
| 5182 | PHP |
swallow
|
2년 전 | 771 | |
| 5181 | 기타 |
swallow
|
2년 전 | 1016 | |
| 5180 | 2년 전 | 568 | |||
| 5179 | 기타 |
swallow
|
2년 전 | 1426 | |
| 5178 | PHP |
swallow
|
2년 전 | 791 | |
| 5177 | JavaScript |
swallow
|
2년 전 | 1484 | |
| 5176 | PHP |
swallow
|
2년 전 | 1181 | |
| 5175 | 2년 전 | 563 | |||
| 5174 | 기타 | 2년 전 | 809 | ||
| 5173 | PHP |
|
2년 전 | 962 | |
| 5172 | PHP |
|
2년 전 | 1251 | |
| 5171 | 기타 |
그누GPT
|
2년 전 | 1552 | |
| 5170 | PHP |
|
2년 전 | 1044 | |
| 5169 | PHP |
|
2년 전 | 1222 | |
| 5168 | PHP |
|
2년 전 | 1191 | |
| 5167 | JavaScript |
|
2년 전 | 993 | |
| 5166 | MySQL | 2년 전 | 1182 | ||
| 5165 | MySQL | 2년 전 | 1247 | ||
| 5164 | PHP | 2년 전 | 1498 | ||
| 5163 | OS |
|
2년 전 | 838 | |
| 5162 | 웹서버 |
|
2년 전 | 887 | |
| 5161 | 웹서버 |
|
2년 전 | 969 | |
| 5160 | PHP |
|
2년 전 | 840 | |
| 5159 | PHP |
|
2년 전 | 901 | |
| 5158 | PHP |
|
2년 전 | 907 | |
| 5157 | PHP |
|
2년 전 | 938 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기