本文整理汇总了PHP中Meta::main_videos方法的典型用法代码示例。如果您正苦于以下问题:PHP Meta::main_videos方法的具体用法?PHP Meta::main_videos怎么用?PHP Meta::main_videos使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Meta
的用法示例。
在下文中一共展示了Meta::main_videos方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
}
$statement = $db->prepare(SQL_UPDATE_CHANNELS);
$statement->execute(array($this->channel_title, $this->channel_description, $this->channel_keywords, $channel["id"]));
$statement->execute();
}
}
function main_videos()
{
$db = $this->get_db();
$statement = $db->prepare(SQL_SELECT_VIDEOS);
$statement->execute();
$videos = $statement->fetchAll(PDO::FETCH_ASSOC);
foreach ($videos as $video) {
$this->video_id = $video["nicoVideoId"];
$this->video_title = null;
$this->video_description = null;
$this->get_video_thumb();
var_dump(array("title" => $this->video_title, "description" => $this->video_description));
if (is_null($this->video_title) || is_null($this->video_description)) {
continue;
}
$statement = $db->prepare(SQL_UPDATE_VIDEOS);
$statement->execute(array($this->video_title, $this->video_description, $video["id"]));
$statement->execute();
}
}
}
$meta = new Meta();
$meta->main_channels();
$meta->main_videos();