查看: 329|回复: 0

[PHP实例] 四十三章 PHP 制作数据透视表

发表于 2018-4-9 08:00:02

echo "";
$sql3= "SELECT FROM cs GROUP BY date";
$ret3 = mysql_query($sql3, $link);
while ($row3 = mysql_fetch_assoc($ret3)) {
echo "";
}
echo "
";
$sql= "SELECT
FROM cs GROUP BY name";
$ret = mysql_query($sql, $link);
while ($row = mysql_fetch_assoc($ret)) {
echo "";
$sql2= "SELECT FROM cs GROUP BY date";
$ret2 = mysql_query($sql2, $link);
while ($row2 = mysql_fetch_assoc($ret2)) {
$sql4= "SELECT
FROM cs where date='".$row2['date']."'and name='".$row['name']."'";
$ret4 = mysql_query($sql4, $link);
$row4 = mysql_fetch_assoc($ret4) ;
echo "";
}
echo "
";
}
图片描述



回复

使用道具 举报