看板 [ PHP ]
討論串[請益] 要怎樣只讓資料庫中最後一筆資料顯示呢
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者bobju (寶貝豬)時間17年前 (2009/02/04 10:23), 編輯資訊
0
0
0
內容預覽:
MySQL: select * from ttt where 1=1 order by id desc limit 0,1;. 上面感覺好像一行文, 補些描述:. order by id desc //依id由大而小排序, 假設愈新的記錄其id愈大.. limit 0,1 //對於查詢結果從排列序號

推噓3(3推 0噓 5→)留言8則,0人參與, 最新作者tnsshnews (tnsshnews)時間17年前 (2009/02/04 09:15), 編輯資訊
0
0
0
內容預覽:
select * from table where constraint;. 找出來的資料有好幾筆. 但是我只想要列出最後新增的那一筆. 請問要怎麼弄呢. 謝謝. --. 發信站: 批踢踢實業坊(ptt.cc). ◆ From: 140.109.21.123.
首頁
上一頁
1
下一頁
尾頁