Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function actionIndex()
- {
- $sql = "SELECT * FROM tbl_now_playing e ORDER BY e.id DESC";
- $dependency = new CDbCacheDependency('SELECT MAX(update_time) FROM news');
- $rows = Yii::app()->db->cache(10000, $dependency)->createCommand($sql)->queryAll();
- $ConvToJSON = CJSON::encode($rows);
- echo '{"items":'. $ConvToJSON .'}';
- Yii::app()->end();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement