1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <?php
- class Model_Label extends PhalApi_Model_NotORM {
-
-
- public function getList(){
-
- $list=DI()->notorm->label
- ->select("id,name")
- ->order("orderno asc")
- ->fetchAll();
-
- return $list;
- }
-
- public function searchLabel($key,$p){
-
- $list=DI()->notorm->label
- ->select("id,name")
- ->where('name like ?','%'.$key.'%')
- ->order("orderno asc")
- ->fetchAll();
-
- return $list;
- }
-
- public function getLabel($id){
-
- $info=DI()->notorm->label
- ->select("id,name,des,thumb")
- ->where('id=?',$id)
- ->fetchOne();
- if($info){
- $info['thumb']=get_upload_path($info['thumb']);
- }
-
- return $info;
- }
-
- public function getVideos($labelid){
-
- $info=DI()->notorm->user_video
- ->where('labelid=?',$labelid)
- ->count();
-
- return $info;
- }
- }
|