<table style="width: 100%;" border="1"> <tr> <th style="width: 30%;">会员</th> <th style="width: 30%;">投稿数量</th> <th style="width: 30%;">采集数量</th> </tr> {m:get sql="SELECT * FROM yzm_member" } {loop $data $v} {php $u = $v[username] } {php $t = $_GET["nian"].'-'.$_GET["yue"] } <tr> <td>{php echo $u}</td> <td> {m:get sql="SELECT count(id) FROM yzmcms_article WHERE username = '$u'"} {loop $data $v} {php echo ($data[0]["count(id)"])} {/loop} </td> <td> {m:get sql="SELECT count(id) FROM yzmcms_article WHERE (username,status,FROM_UNIXTIME(inputtime,'%Y-%m')) = ('$u',0,'$t')"} {loop $data $v} {php echo ($data[0]["count(id)"])} {/loop} </td> </tr> {/loop} </table>