【发布时间】:2011-03-17 02:17:11
【问题描述】:
现在我有:
Table playlist (id, name, id_user,many_items,last_item_used,...)
table playlist_map (id, id_user, id_item,position...)
我想知道,这是否足以让我让用户从播放列表中添加/删除项目,并从播放列表中加载上一个和下一个项目?
或者我应该改变我的计划? (我已经完成了 50% 的 PHP,仍然没有问题,但我有这种感觉..)
提前致谢:P
我已经完成了播放列表的插入/编辑/删除,现在我准备好了:
class playlist_item{
protected $id;
protected $id_item;
protected $nombre;
protected $url;
protected $id_playlist;
protected $position;
function __construct($id) {
}
function get_what($what){
if($what == 'next'){
}else if($what == 'prev'){
}else if($what == 'last'){
}else if($what == 'first'){
}else if($what == 'current'){
}
}
}
【问题讨论】:
-
通过写这个.... ehm.. 在 playlist_map 中排序,对吗??
标签: php mysql sql database-design database-schema