| 網上書店 | 英文書店 | 便利店 |
| 連鎖書店 | 宗教書店 | 海外及學校批發 | 獨立書店 |
require_once('common.inc.php'); //db to array $sql = "SELECT * FROM `distributor` where `levelone` = '1' AND `display` = '1' ORDER BY `sorting` ASC, `id` ASC"; $rs = $db->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 .= '
| 網上書店 | 英文書店 | 便利店 |
| 連鎖書店 | 宗教書店 | 海外及學校批發 | 獨立書店 |