下拉月份和年份,然后提交。
<span class="pln">fieldid</span><span class="pun">,</span>
<span class="pln"> name</span>
<span class="pun">,</span>
<span class="pln"> time(int)<br></span>
<span class="pun">============================</span><span class="pln"><br></span>
<span class="lit">1</span>
<span class="pln"> test1 </span>
<span class="lit">158565545</span><span class="pln"><br></span><span class="lit">2</span>
<span class="pln"> test2 </span>
<span class="lit">159545222</span><span class="pln"><br></span><span class="lit">3</span>
<span class="pln"> test3 </span>
<span class="lit">159995545</span><span class="pln"><br></span>
fieldid, name, time(INT)
============================
1 test1 158565545
2 test2 152548856
3 test3 159544856
等...
显示报告如: test1是当月 test2适用于prev。月 等等。
当我第一次在当月报告显示时加载页面时,如何每月获取记录?
答案 0 :(得分:0)
select *
from MyTable
where MONTH(FROM_UNIXTIME(time)) = MONTH(NOW())