Re: [問題] 點歌系統的待播歌曲?

看板WebRadio作者 (踢踢歪)時間16年前 (2008/04/29 09:50), 編輯推噓2(200)
留言2則, 2人參與, 最新討論串2/2 (看更多)
samphpweb.rar (再次感謝EAFV大) 裡面有個playing.php 這就是播放曲目的php 29-42行 $db->open("SELECT songlist.ID as ID, songlist.artist as artist, songlist.title as title, songlist.album as album, queuelist.requestID as requestID FROM queuelist, songlist WHERE (queuelist.songID = songlist.ID) AND (songlist.songtype='S') AND (songlist.artist <> '') ORDER BY queuelist.sortID ASC LIMIT 2"); $queue = $db->rows(); reset($queue); 這個2就是會顯示出來的待播曲目 同理4-27行 $db->open("SELECT songlist.ID as ID, songlist.balance as balance, songlist.date_played as date_played, songlist.date_artist_played as date_artist_played, songlist.date_album_played as date_album_played, songlist.date_title_played as date_title_played, songlist.duration as duration, songlist.artist as artist, songlist.title as title, songlist.album as album, songlist.picture as picture, songlist.lyrics as lyrics, songlist.last_requested as last_requested, historylist.listeners as listeners, historylist.requestID as requestID, historylist.date_played as starttime FROM historylist,songlist WHERE (historylist.songID = songlist.ID) AND (songlist.songtype='S') ORDER BY historylist.date_played DESC LIMIT 6"); $history = $db->rows(); reset($history); 這個6就是目前播放曲目包括下方五首歷史曲目(1+5) 如果調成11就是目前播放曲目包括下方十首歷史曲目(1+10) 這個數量斟酌修改就好 太大會造成資料庫的負擔 如果你網路速度不夠也會有影響喔 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 118.166.47.188

04/29 09:55, , 1F
感謝<(_ _)>
04/29 09:55, 1F

08/08 12:41, , 2F
推推 爬到此文解決了 感恩
08/08 12:41, 2F
文章代碼(AID): #185dxWjg (WebRadio)
文章代碼(AID): #185dxWjg (WebRadio)