當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Song::findAll方法代碼示例

本文整理匯總了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');
 }
開發者ID:kenmaz,項目名稱:www.kenmaz.net,代碼行數:11,代碼來源:IndexAction.class.php

示例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);
 }
開發者ID:returncn,項目名稱:chen-xia-cms,代碼行數:9,代碼來源:AdminController.php

示例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);
 }
開發者ID:returncn,項目名稱:chen-xia-cms,代碼行數:19,代碼來源:IndexController.php


注:本文中的Song::findAll方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。