当前位置: 首页>>代码示例>>PHP>>正文


PHP Model::many方法代码示例

本文整理汇总了PHP中Model::many方法的典型用法代码示例。如果您正苦于以下问题:PHP Model::many方法的具体用法?PHP Model::many怎么用?PHP Model::many使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Model的用法示例。


在下文中一共展示了Model::many方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getAllByPopular

 public static function getAllByPopular()
 {
     //		$sql = "select * from ".self::$tablename;
     $sql = "select *,count(*) as total from " . self::$tablename . " group by channel_id limit 10";
     $query = Executor::doit($sql);
     return Model::many($query[0], new FollowerData());
 }
开发者ID:evilnapsis,项目名称:imayik,代码行数:7,代码来源:FollowerData.php

示例2: getPublics

 public static function getPublics()
 {
     $sql = "select * from " . self::$tablename . " where is_public=1";
     $query = Executor::doit($sql);
     return Model::many($query[0], new StatusData());
 }
开发者ID:alfieris,项目名称:katana,代码行数:6,代码来源:StatusData.php

示例3: getLike

 public static function getLike($q)
 {
     $sql = "select * from " . self::$tablename . " where name like '%{$q}%'";
     $query = Executor::doit($sql);
     return Model::many($query[0], new BlockData());
 }
开发者ID:evilnapsis,项目名称:xoolar-lite,代码行数:6,代码来源:BlockData.php

示例4: getInputByProductIdCutIdYesF

 public static function getInputByProductIdCutIdYesF($product_id, $cut_id)
 {
     $sql = "select * from " . self::$tablename . " where product_id={$product_id} and cut_id={$cut_id} and operation_type_id=1 order by created_at desc";
     $query = Executor::doit($sql);
     return Model::many($query[0], new OperationData());
 }
开发者ID:kpocha,项目名称:inventio-lite,代码行数:6,代码来源:OperationData.php

示例5: getAllByUserId

 public static function getAllByUserId($user_id)
 {
     $sql = "select * from " . self::$tablename . " where user_id={$user_id} order by created_at desc";
     $query = Executor::doit($sql);
     return Model::many($query[0], new ProductData());
 }
开发者ID:evilnapsis,项目名称:thunder,代码行数:6,代码来源:ProductData.php

示例6: getAllByUID

 public static function getAllByUID($uid)
 {
     $sql = "select * from " . self::$tablename . " where user_id={$uid}";
     $query = Executor::doit($sql);
     return Model::many($query[0], new ChannelData());
 }
开发者ID:evilnapsis,项目名称:imayik,代码行数:6,代码来源:ChannelData.php

示例7: getLike

 public static function getLike($q)
 {
     $sql = "select * from " . self::$tablename . " inner join profile on (user.id=profile.user_id) where name like '%{$q}%' or lastname like '%{$q}%' ";
     $query = Executor::doit($sql);
     return Model::many($query[0], new UserData());
 }
开发者ID:rogelino,项目名称:smile,代码行数:6,代码来源:UserData.php

示例8: getAllByUserId

 public static function getAllByUserId($user)
 {
     $sql = "select * from " . self::$tablename . " where user_id=" . $user;
     $query = Executor::doit($sql);
     return Model::many($query[0], new CommentData());
 }
开发者ID:proyectoseb,项目名称:inventarios,代码行数:6,代码来源:CommentData.php

示例9: getAllAppliedByPage

 public static function getAllAppliedByPage($start_from, $limit)
 {
     $sql = "select * from " . self::$tablename . " where id<={$start_from} and is_applied=1 limit {$limit}";
     $query = Executor::doit($sql);
     return Model::many($query[0], new SellData());
 }
开发者ID:evilnapsis,项目名称:thunder,代码行数:6,代码来源:SellData.php

示例10: getAllByDay

 public static function getAllByDay()
 {
     $sql = "select *,date(created_at) as created_date,count(*) as total from " . self::$tablename . " group by date(created_at) order by date(created_at) desc";
     $query = Executor::doit($sql);
     return Model::many($query[0], new ImageData());
 }
开发者ID:evilnapsis,项目名称:imayik,代码行数:6,代码来源:ImageData.php

示例11: getLast5ByChannelId

 public static function getLast5ByChannelId($channel_id)
 {
     $sql = "select * from " . self::$tablename . " where channel_id={$channel_id} order by created_at desc limit 5";
     $query = Executor::doit($sql);
     return Model::many($query[0], new NotificationData());
 }
开发者ID:evilnapsis,项目名称:imayik,代码行数:6,代码来源:NotificationData.php

示例12: getAll

 public static function getAll()
 {
     $sql = "select * from " . self::$tablename;
     $query = Executor::doit($sql);
     return Model::many($query[0], new UserData());
 }
开发者ID:evilnapsis,项目名称:imayik,代码行数:6,代码来源:CategoryData.php

示例13: getAllByDateBCOp

 public static function getAllByDateBCOp($clientid, $start, $end, $op)
 {
     $sql = "select * from " . self::$tablename . " where date(created_at) >= \"{$start}\" and date(created_at) <= \"{$end}\" and client_id={$clientid}  and operation_type_id={$op} order by created_at desc";
     $query = Executor::doit($sql);
     return Model::many($query[0], new SellData());
 }
开发者ID:kpocha,项目名称:inventio-lite,代码行数:6,代码来源:SellData.php

示例14: getAllbyImageId

 public static function getAllbyImageId($image_id)
 {
     $sql = "select * from " . self::$tablename . " where image_id={$image_id}";
     $query = Executor::doit($sql);
     return Model::many($query[0], new ImageViewData());
 }
开发者ID:evilnapsis,项目名称:imayik,代码行数:6,代码来源:ImageViewData.php

示例15: getAllByCategoryId

 public static function getAllByCategoryId($category_id)
 {
     $sql = "select * from " . self::$tablename . " where category_id={$category_id} order by created_at desc";
     $query = Executor::doit($sql);
     return Model::many($query[0], new FileData());
 }
开发者ID:proyectoseb,项目名称:inventarios,代码行数:6,代码来源:FileData.php


注:本文中的Model::many方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。