→ tkdmaf:在資料庫語法中下判斷即可。至於怎麼寫?請閱讀書籍。 06/15 07:07
推 allenmusic:SELECT * FROM mytable ORDER BY date desc 06/15 07:58
→ allenmusic:用order by date desc選出最近一筆資料 06/15 07:59
推 allenmusic:desc 倒序 asc順序 06/15 08:03
→ stilllove56:不好意思...不過我不是很了解,ORDER BY date desc最 06/15 12:43
→ stilllove56:不是還是得到一串資料嗎,如果我只想要前兩個最新的 06/15 12:43
→ stilllove56:怎麼拿會比較好呢? 06/15 12:43
推 mrbigmouth:ORDER BY date DESC LIMIT 2 06/15 12:59
→ stilllove56:那再請教一下,假如我拿出的十個資料我想各別拿出來使 06/15 13:18
→ stilllove56:用,做一些運算,像指數平滑之類的,我不能直接操作取 06/15 13:21
→ stilllove56:出的陣列嗎,還是取出的不是陣列@@ 06/15 13:22
推 allenmusic:個別取出 再用array_push存到陣列中 06/15 15:22