Yangi formatda davom etish uchun: https://uzfor.net/view.php?act=post&id=68656
Postga havola
Besthakker [929] [off]
shahzodbekpro, # shahzodbekpro (02.08.2019 / 10:46)
Library papkasi ichidagi bo'limlarni alohida alohida tezkor chiqadigan qilish kodi kerak
Misol
Yangiliklar
So'ngi maqolalar
shu kabi<?php
echo'<div class="phdr"><H1>Kutubxona bo`limlari</H1></div>';
$sql= mysql_query("SELECT `id`, `name`, `dir`, `description` FROM `library_cats` WHERE `parent`=0 ORDER BY `pos` ASC");
$total= mysql_result( mysql_query("SELECT COUNT(*) FROM `library_cats` WHERE `parent`=0"),0);
$y=0;
if($total){
while($row= mysql_fetch_assoc($sql)){
$y++;
echo'<div class="menu"><a href="library/index.php?do=dir&id='.$row['id'].'"> '. functions::checkout($row['name']).'</a> <div class="" style="float:right;"> <span class="time">['. mysql_result( mysql_query("SELECT COUNT(*) FROM `".($row['dir'] ? 'library_cats':'library_texts')."` WHERE ".($row['dir'] ? '`parent`='.$row['id']:'`cat_id`='.$row['id'])),0).']</span></div></div>';
}
}
?>
Library papkasi ichidagi bo'limlarni alohida alohida tezkor chiqadigan qilish kodi kerak
Misol
Yangiliklar
So'ngi maqolalar
shu kabi<?php
echo'<div class="phdr"><H1>Kutubxona bo`limlari</H1></div>';
$sql= mysql_query("SELECT `id`, `name`, `dir`, `description` FROM `library_cats` WHERE `parent`=0 ORDER BY `pos` ASC");
$total= mysql_result( mysql_query("SELECT COUNT(*) FROM `library_cats` WHERE `parent`=0"),0);
$y=0;
if($total){
while($row= mysql_fetch_assoc($sql)){
$y++;
echo'<div class="menu"><a href="library/index.php?do=dir&id='.$row['id'].'"> '. functions::checkout($row['name']).'</a> <div class="" style="float:right;"> <span class="time">['. mysql_result( mysql_query("SELECT COUNT(*) FROM `".($row['dir'] ? 'library_cats':'library_texts')."` WHERE ".($row['dir'] ? '`parent`='.$row['id']:'`cat_id`='.$row['id'])),0).']</span></div></div>';
}
}
?>