merhaba arkadaşlar bir yerde takılı kaldım
yukarıda böyle bir kod var ben burda belirlediğim news tablosunun içinde belirli category sütünlarını yan yana sıralamak istiyorum
şu an sadece news tablosunun içinde 36 idli category i tek ekrana veriyor
news tablosunun içinde 3 farklı category idi yan yana yazdırmak istiyorum nasıl yapılacak yardımcı olursanız sevinirim teşekkürler
PHP:
<div class="news_boxs">
<?php
$list1='1';
$Home_News_Box_Spin = sprintf("select id,title,seotitle,short,images,oclock_date,link_date,category from news where category='32'<>'0' order by id desc limit 0,3");
$Home_News_Box_Query = Query($Home_News_Box_Spin);
while ($Home_News_Box_Write = Object($Home_News_Box_Query)){
if(($list1=="1") || ($list1=="4") ){
$margin="9px 12px 9px 0px";
}elseif(($list1=="2") || ($list1=="5")){
$margin="9px 12px 9px 12px";
}else{
$margin="9px 0px 9px 15px";}
?>
<div class="php_news_box" style="margin:<?=$margin ?>; position:relative">
<div style="position:absolute; top:3px; left:3px; padding:4px; background-color: #C00; color:#FFF"><?=NewsCategoryWrite($Home_News_Box_Write->category) ?></div>
<a title="<?=WriteTool($Home_News_Box_Write->title) ?>" href="<?=newslink($Home_News_Box_Write->id,$Home_News_Box_Write->seotitle) ?>"><img src="files/news/thumb/<?=$Home_News_Box_Write->images ?>" width="204" height="140" alt="" border="0" /></a>
<div class="php_news_box_title"><a title="<?=WriteTool($Home_News_Box_Write->title) ?>" href="<?=newslink($Home_News_Box_Write->id,$Home_News_Box_Write->seotitle) ?>"><?=mb_substr(WriteTool($Home_News_Box_Write->title),0,55,'utf-8') ?></a><a href="#"></a></div>
<div class="php_news_box_short"><a title="<?=WriteTool($Home_News_Box_Write->title) ?>" href="<?=newslink($Home_News_Box_Write->id,$Home_News_Box_Write->seotitle) ?>"><?=mb_substr(WriteTool($Home_News_Box_Write->short),0,90,'utf-8') ?>...</a></div>
</div>
<?php $list1++; } ?>
<div class="clear"></div>
</div>
şu an sadece news tablosunun içinde 36 idli category i tek ekrana veriyor
news tablosunun içinde 3 farklı category idi yan yana yazdırmak istiyorum nasıl yapılacak yardımcı olursanız sevinirim teşekkürler