日期:2014-05-17 浏览次数:20598 次
................
$result=mysql_query("select year(addtime) as y,group_concat(jiage) as str from table_name group by year(addtime);");
while($row=mysql_fetch_assoc($result)){
echo '<tr>';
echo "<td>$row[y]</td>";
foreach(explode(',',$row[str]) as $v)
echo "<td>$v</td>;
echo '</tr>';
}
............
------解决方案--------------------
$result=mysql_query("select year(add_date) as y,group_concat(yc_jiage) as str from jiagedata group by year(add_date);") or die(mysql_error());
贴出提示。
------解决方案--------------------
执行#12楼后提示什么信息。