0
我在我的網站上添加一個推介大賽頁面,我需要從今天的日期競賽日期設置爲將來的日期,我需要證明我每天結果的成員,我的代碼如下如何獲得每日結果以顯示成員?
$my_time = time() - 5184000;
$top10 = $db->query("SELECT m2.username, count(*) as referrals FROM users m1 inner join users m2 on m1.ref=m2.id where m1.reg_time <= $my_time group by m1.ref, m2.username ORDER BY `referrals` DESC LIMIT 10");
<div class="box">
<div class="info_box">Top 10 referrers in last 60 days</div>
<table class="table">
<tr><th>Username</th><th>Total Referrals</th></tr>
<?php if (count($top10) > 0) {
while($row = $top10->fetch_assoc()) {
echo "<tr>";
echo "<td>{$row['username']}</td>";
echo "<td>{$row['referrals']}</td>";
echo "</tr>";
}
}
?>
</table>
</div>
但是這個代碼給我只能這樣的結果:
如何設置導致今天開始,在未來的日子結束?