本文整理汇总了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());
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}
示例12: getAll
public static function getAll()
{
$sql = "select * from " . self::$tablename;
$query = Executor::doit($sql);
return Model::many($query[0], new UserData());
}
示例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());
}
示例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());
}
示例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());
}