2026, 새로운 도약을 시작합니다.

카테고리 만드는 예제.

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]

첨부파일

category.sql (2 KB) 7회 2024-02-16 23:53
|

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

개발자팁

개발과 관련된 유용한 정보를 공유하세요.
질문은 QA에서 해주시기 바랍니다.
번호 분류 제목 글쓴이 날짜 조회
5402 MySQL 6일 전 조회 21
5401 JavaScript 3주 전 조회 116
5400 MySQL 1개월 전 조회 222
5399 PHP 2개월 전 조회 468
5398 PHP 2개월 전 조회 353
5397 PHP 2개월 전 조회 284
5396 기타 5개월 전 조회 559
5395 PHP 6개월 전 조회 1,196
5394 MySQL 7개월 전 조회 790
5393 웹서버 9개월 전 조회 985
5392 1년 전 조회 1,309
5391 11개월 전 조회 1,319
5390 11개월 전 조회 1,114
5389 10개월 전 조회 1,030
5388 10개월 전 조회 1,170
5387 9개월 전 조회 962
5386 JavaScript 9개월 전 조회 1,148
5385 웹서버 9개월 전 조회 1,169
5384 JavaScript 10개월 전 조회 991
5383 기타 11개월 전 조회 1,415
5382 기타 11개월 전 조회 660
5381 JavaScript 11개월 전 조회 1,075
5380 기타 11개월 전 조회 833
5379 JavaScript 11개월 전 조회 831
5378 1년 전 조회 1,396
5377 기타 1년 전 조회 941
5376 jQuery 1년 전 조회 639
5375 jQuery 1년 전 조회 871
5374 기타 1년 전 조회 948
5373 MySQL 1년 전 조회 980
🐛 버그신고