query($sql.$sql_limit); // gen table ======================================== $allTable=''; $perRow=4; $tdWidth=(100/$perRow).'%'; $total=mysql_affected_rows(); $i=0; while ($row = $db->fetch_array($result)) { /* // get more information from other table $tbname_p="fund_product"; $sql2 = "SELECT id FROM `".$tbname_p."` where display='1' and category_id='".$row[id]."' order by date desc "; $temp1=$db->getrow($sql2); $file=get_attachment($tbname_p,$temp1[id],"attachment"); $photo1=get_attachment($tbname,$row[id],"photo1"); // ======= */ $photo1=get_attachment($tbname,$row[id],"photo1"); $photo1_s=add_prefix($photo1); $photo1_m=add_prefix($photo1,"m"); $date=date("d-m-Y",$row[mydate]); /*130 84 $description=$row[content]; if(strlen($description)>150){ $description=substr($description,0,150)."..."; } $description=nl2br($description);*/ $i++; // content detail $mylink=$row[text]; if($mylink==""){ $mylink='news_info_detail.php?id='.$row["id"]; $mytarget=''; }else{ /* $mytarget=' target="_blank" ';*/ } $mycontent='
'.$row["c_name"].'
'; // td style $allTable.=' '; // add empty row if(($i) % $perRow==0 && ($i)<$total){ //$allTable.=''; $allTable.=''; } } // add empty td if( $total<$perRow){ for($x=$total;$x<$perRow;$x++){ $allTable.=''; } } $allTable.=''; // ======================================== include("paging.php"); ?> OneWorld Learning