本文整理汇总了PHP中dbex::close方法的典型用法代码示例。如果您正苦于以下问题:PHP dbex::close方法的具体用法?PHP dbex::close怎么用?PHP dbex::close使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dbex
的用法示例。
在下文中一共展示了dbex::close方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dbex
include_once $webRoot . 'foundation/debug.php';
$c = new SaeTClientV2(WB_AKEY, WB_SKEY, $_SESSION['stoken']);
$dbo = new dbex($dbServs);
/* 获取关注任务的图标url */
$sql = "select task_id, task_sina_uid from task where type='follow' and (task_icon_url IS NULL OR task_screen_name IS NULL OR task_location IS NULL) limit 2";
$sql_res = $dbo->getRs($sql);
foreach ($sql_res as $user) {
$user_info = $c->show_user_by_id($user['task_sina_uid']);
if_weiboapi_fail($user_info);
$icon_url = $user_info['avatar_large'];
$screen_name = $user_info['screen_name'];
$location = $user_info['location'];
// echo '<p><img src="'.$icon_url.'" />'.$location.$screen_name.'</p>';
$sql = "update task set task_icon_url='{$icon_url}', task_screen_name='{$screen_name}', task_location='{$location}' where task_id = {$user['task_id']} limit 1";
echo '<p>' . $sql . '</p>';
$dbo->query($sql);
}
/* 获取转发任务的小图标,微博内容,微博图片大url和小url */
$sql = "select task_id, task_sina_wid from task where type='repost' and (task_icon_url IS NULL OR task_thumbnail_pic_url IS NULL OR task_bmiddle_pic_url IS NULL OR task_text IS NULL) limit 50";
$sql_res = $dbo->getRs($sql);
foreach ($sql_res as $user) {
$weibo = $c->show_status($user['task_sina_wid']);
if_weiboapi_fail($weibo);
$task_icon_url = $weibo['user']['profile_image_url'];
$task_thumbnail_pic_url = $weibo['thumbnail_pic_url'];
$task_bmiddle_pic_url = $weibo['bmiddle_pic_url'];
$task_text = $weibo['text'];
echo '<img src="' . $task_icon_url . '">' . "<p>{$task_text}</p>" . '<a href="' . $task_bmiddle_pic_url . '"><img src="' . $task_thumbnail_pic_url . '"></a>';
}
$dbo->close();