謝晒的PHP網頁設計
聯絡E-mail:
sean0704@gmail.com
Wednesday, February 13, 2013
[MYSQL] 設定要撈出幾筆資料"LIMIT"
本範例為從0的位置(即第一筆)開始,取出五筆資料。
SELECT * FROM mytable ORDER BY id DESC LIMIT 0,5
也可簡寫成
SELECT * FROM mytable ORDER BY id DESC LIMIT 5
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment