时间:2021-07-01 10:21:17 帮助过:59人阅读
1 12信息统计表 13 1415 18 19 20 ';21 while($row = mysql_fetch_array($result)) {22 $gw = explode(",",$row['gw']);23 echo '24单位 16负责人 1725 28 ';29 if($row['num'] > 1){30 for($i=1;$i<$row['num'];$i++){31 echo ''.$row['danwei'].' 26'.iconv("gbk","utf-8",$gw[0]).' 27';32 }33 }else{34 35 }36 37 }38 39 echo '40 41 42 ';43 ?> '.iconv("gbk","utf-8",$gw[$i]).'
1 CREATE TABLE IF NOT EXISTS `dy` ( 2 `id` int(11) unsigned NOT NULL AUTO_INCREMENT, 3 `danwei` varchar(30) NOT NULL, 4 `fuze` varchar(30) NOT NULL, 5 PRIMARY KEY (`id`) 6 ) ENGINE=MyISAM DEFAULT CHARSET=gbk AUTO_INCREMENT=7 ; 7 8 -- 9 -- 转存表中的数据 `dy`10 --11 12 INSERT INTO `dy` (`id`, `danwei`, `fuze`) VALUES13 (1, 'a', '小张'),14 (2, 'a', '小孙'),15 (3, 'b', '小王'),16 (4, 'c', '小李'),17 (5, 'a', '小红'),18 (6, 'b', '小赵');
功能实现预览: