本文整理匯總了PHP中Song::findAll方法的典型用法代碼示例。如果您正苦於以下問題:PHP Song::findAll方法的具體用法?PHP Song::findAll怎麽用?PHP Song::findAll使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Song
的用法示例。
在下文中一共展示了Song::findAll方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: execute
public function execute($smarty, $params, $session)
{
$smarty->assign('name', $session['screen_name']);
$artists = Artist::findAll();
$smarty->assign('artists', $artists);
$songs = Song::findAll();
$smarty->assign('songs', $songs);
$parts = Part::findAll();
$smarty->assign('parts', $parts);
$smarty->display('index.tpl');
}
示例2: actionImusic
public function actionImusic()
{
Createmusiclist();
$url = "http://" . Yii::app()->params['bucket'] . "." . Yii::app()->params['domain'] . "/";
$songModel = new Song();
$songInfo = $songModel->findAll('userid=:uid', array(':uid' => Yii::app()->session['uid']));
$data = array('songInfo' => $songInfo, 'url' => $url);
$this->render("imusic", $data);
}
示例3: actionMusic
public function actionMusic($who)
{
$uid = $who;
$this->Myaccess($uid);
$songModel = new Song();
$data['musiclist'] = $songModel->findAll('userid=:uid', array(':uid' => $uid));
if (empty($data['musiclist'])) {
$data['message'] = "Oh,Sorry~,Empty in Music List。~";
$data['backup'] = "/index/index";
$data['params'] = array();
$this->layout = "//layouts/error";
$this->render("error", $data);
die;
}
$data['uid'] = $uid;
$data['url'] = "http://" . Yii::app()->params['bucket'] . "." . Yii::app()->params['domain'] . "/";
$this->layout = "//layouts/illokit";
$this->render('music', $data);
}