Re: [問題] 點歌系統的待播歌曲?
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
討論串 (同標題文章)
完整討論串 (本文為第 2 之 2 篇):
1
2
WebRadio 近期熱門文章
PTT影音娛樂區 即時熱門文章