本文整理汇总了PHP中Executor::doit方法的典型用法代码示例。如果您正苦于以下问题:PHP Executor::doit方法的具体用法?PHP Executor::doit怎么用?PHP Executor::doit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Executor
的用法示例。
在下文中一共展示了Executor::doit方法的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: one_object
public static function one_object($sql)
{
$query = Executor::doit($sql);
$cnt = 0;
$found = null;
$data = null;
while ($r = $query[0]->fetch_object()) {
$data = $r;
$found = $data;
break;
}
return $found;
}
示例3: getByName
public static function getByName($name)
{
$sql = "select * from " . self::$tablename . " where name=\"{$name}\"";
$query = Executor::doit($sql);
$found = null;
$data = new StatusData();
while ($r = $query->fetch_array()) {
$data->id = $r['id'];
$data->name = $r['name'];
$found = $data;
break;
}
return $found;
}
示例4: getAll
public static function getAll()
{
$sql = "select * from " . self::$tablename;
$query = Executor::doit($sql);
$array = array();
$cnt = 0;
while ($r = $query->fetch_array()) {
$array[$cnt] = new UserTypeData();
$array[$cnt]->id = $r['id'];
$array[$cnt]->name = $r['name'];
$cnt++;
}
return $array;
}
示例5: getLike
public static function getLike($q)
{
$sql = "select * from " . self::$tablename . " where name like '%{$q}%'";
$query = Executor::doit($sql);
$array = array();
$cnt = 0;
while ($r = $query[0]->fetch_array()) {
$array[$cnt] = new BoxData();
$array[$cnt]->id = $r['id'];
$array[$cnt]->created_at = $r['created_at'];
$cnt++;
}
return $array;
}
示例6: getAll
public static function getAll()
{
$sql = "select * from " . self::$tablename . " order by created_at desc";
$query = Executor::doit($sql);
$array = array();
$cnt = 0;
while ($r = $query[0]->fetch_array()) {
$array[$cnt] = new OperationTypeData();
$array[$cnt]->id = $r['id'];
$array[$cnt]->name = $r['name'];
$cnt++;
}
return $array;
}
示例7: getAll
public static function getAll()
{
$sql = "select * from " . self::$tablename . " order by created_at desc";
$query = Executor::doit($sql);
$array = array();
$cnt = 0;
while ($r = $query->fetch_array()) {
$array[$cnt] = new AlbumImageData();
$array[$cnt]->album_id = $r['album_id'];
$array[$cnt]->image_id = $r['image_id'];
$array[$cnt]->created_at = $r['created_at'];
$cnt++;
}
return $array;
}
示例8: getAll
public static function getAll()
{
$sql = "select * from " . self::$tablename . "";
$query = Executor::doit($sql);
$array = array();
$cnt = 0;
while ($r = $query[0]->fetch_array()) {
$array[$cnt] = new ThemeData();
$array[$cnt]->id = $r['id'];
$array[$cnt]->name = $r['name'];
$array[$cnt]->header_background_color = $r['header_background_color'];
$array[$cnt]->header_text_color = $r['header_text_color'];
$array[$cnt]->body_background_color = $r['body_background_color'];
$array[$cnt]->body_text_color = $r['body_text_color'];
$cnt++;
}
return $array;
}
示例9: getAllBySlideId
public static function getAllBySlideId($slide_id)
{
$sql = "select * from " . self::$tablename . " where slide_id={$slide_id} order by created_at desc";
$query = Executor::doit($sql);
$array = array();
$cnt = 0;
while ($r = $query[0]->fetch_array()) {
$array[$cnt] = new LoveData();
$array[$cnt]->id = $r['id'];
$array[$cnt]->slide_id = $r['slide_id'];
$array[$cnt]->user_id = $r['user_id'];
$array[$cnt]->created_at = $r['created_at'];
$cnt++;
}
return $array;
}
示例10: getAll
public static function getAll()
{
$sql = "select * from " . self::$tablename . " order by created_at desc";
$query = Executor::doit($sql);
$array = array();
$cnt = 0;
while ($r = $query->fetch_array()) {
$array[$cnt] = new AlbumData();
$array[$cnt]->id = $r['id'];
$array[$cnt]->name = $r['name'];
$array[$cnt]->title = $r['title'];
$array[$cnt]->description = $r['description'];
$array[$cnt]->tags = $r['tags'];
$array[$cnt]->channel_id = $r['channel_id'];
$array[$cnt]->category_id = $r['category_id'];
$array[$cnt]->privacy_id = $r['privacy_id'];
$array[$cnt]->created_at = $r['created_at'];
$cnt++;
}
return $array;
}
示例11: 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);
$array = array();
$cnt = 0;
while ($r = $query[0]->fetch_array()) {
$array[$cnt] = new ProductData();
$array[$cnt]->id = $r['id'];
$array[$cnt]->name = $r['name'];
$array[$cnt]->price_in = $r['price_in'];
$array[$cnt]->price_out = $r['price_out'];
$array[$cnt]->presentation = $r['presentation'];
$array[$cnt]->unit = $r['unit'];
$array[$cnt]->user_id = $r['user_id'];
$array[$cnt]->created_at = $r['created_at'];
$cnt++;
}
return $array;
}
示例12: 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());
}
示例13: getAll
public static function getAll()
{
$sql = "select * from " . self::$tablename;
$query = Executor::doit($sql);
return Model::one($query[0], new NotificationTypeData());
}
示例14: getLike
public static function getLike($q)
{
$sql = "select * from " . self::$tablename . " where title like '%{$q}%' or content like '%{$q}%'";
$query = Executor::doit($sql);
$array = array();
$cnt = 0;
while ($r = $query[0]->fetch_array()) {
$array[$cnt] = new PostData();
$array[$cnt]->id = $r['id'];
$array[$cnt]->title = $r['title'];
$array[$cnt]->content = $r['content'];
$array[$cnt]->image = $r['image'];
$array[$cnt]->is_public = $r['is_public'];
$array[$cnt]->user_id = $r['user_id'];
$array[$cnt]->created_at = $r['created_at'];
$cnt++;
}
return $array;
}
示例15: 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());
}