query($sql); $array1 = array(); $count = 0; $total = mysql_num_rows($rs); while($row=$db->fetch_array($rs)){ $array1[$count] = $row['name']; $count++; } //db to array $sql = "SELECT * FROM `distributor` where `levelone` = '2' AND `display` = '1' ORDER BY `sorting` ASC, `id` ASC"; $rs = $db->query($sql); $array2 = array(); $count = 0; if( mysql_num_rows($rs) > $total ){ $total = mysql_num_rows($rs); } while($row=$db->fetch_array($rs)){ $array2[$count] = $row['name']; $count++; } //db to array $sql = "SELECT * FROM `distributor` where `levelone` = '3' AND `display` = '1' ORDER BY `sorting` ASC, `id` ASC"; $rs = $db->query($sql); $array3 = array(); $count = 0; if( mysql_num_rows($rs) > $total ){ $total = mysql_num_rows($rs); } while($row=$db->fetch_array($rs)){ $array3[$count] = $row['name']; $count++; } //print list $list = ''; for($i=0;$i<$total;$i++){ $bgcolor = 'bgcolor="#e9eede"'; if($i%2==0){ $bgcolor = 'bgcolor="#dcebda"'; } $list .= ' '.$array1[$i].' '.$array2[$i].' '.$array3[$i].' '; } //db to array $sql = "SELECT * FROM `distributor` where `levelone` = '4' AND `display` = '1' ORDER BY `sorting` ASC, `id` ASC"; $rs = $db->query($sql); $array4 = array(); $count = 0; $total = mysql_num_rows($rs); while($row=$db->fetch_array($rs)){ $array4[$count] = $row['name']; $count++; } //db to array $sql = "SELECT * FROM `distributor` where `levelone` = '5' AND `display` = '1' ORDER BY `sorting` ASC, `id` ASC"; $rs = $db->query($sql); $array5 = array(); $count = 0; if( mysql_num_rows($rs) > $total ){ $total = mysql_num_rows($rs); } while($row=$db->fetch_array($rs)){ $array5[$count] = $row['name']; $count++; } //db to array $sql = "SELECT * FROM `distributor` where `levelone` = '6' AND `display` = '1' ORDER BY `sorting` ASC, `id` ASC"; $rs = $db->query($sql); $array6 = array(); $count = 0; if( mysql_num_rows($rs) > $total ){ $total = mysql_num_rows($rs); } while($row=$db->fetch_array($rs)){ $array6[$count] = $row['name']; $count++; } //db to array $sql = "SELECT * FROM `distributor` where `levelone` = '7' AND `display` = '1' ORDER BY `sorting` ASC, `id` ASC"; $rs = $db->query($sql); $array7 = array(); $count = 0; if( mysql_num_rows($rs) > $total ){ $total = mysql_num_rows($rs); } while($row=$db->fetch_array($rs)){ $array7[$count] = $row['name']; $count++; } //print list $list2 = ''; for($i=0;$i<$total;$i++){ $bgcolor = 'bgcolor="#e9eede"'; if($i%2==0){ $bgcolor = 'bgcolor="#dcebda"'; } $list2 .= ' '.$array4[$i].' '.$array5[$i].' '.$array6[$i].' '.$array7[$i].' '; } ?>

網上書店 英文書店 便利店

連鎖書店 宗教書店 海外及學校批發 獨立書店