本文整理匯總了PHP中dbex::getAll方法的典型用法代碼示例。如果您正苦於以下問題:PHP dbex::getAll方法的具體用法?PHP dbex::getAll怎麽用?PHP dbex::getAll使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類dbex
的用法示例。
在下文中一共展示了dbex::getAll方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: paper_get_unread_papers
function paper_get_unread_papers($user_id)
{
global $tablePreStr;
global $dbServs;
$dbo = new dbex();
$t_comments = $tablePreStr . "comments";
$t_papers = $tablePreStr . "papers";
dbtarget('r', $dbServs);
$data = array();
if (null == $user_id) {
return $data;
}
$datasql = "select {$t_papers}.* from {$t_papers} where {$t_papers}.paper_id in \n(select distinct {$t_comments}.paper_id as unread_count from {$t_comments} \n\twhere (({$t_comments}.paper_id in (select {$t_papers}.paper_id from {$t_papers} where {$t_papers}.user_id = {$user_id}) and {$t_comments}.comment_type=1) \n\t\t\t or ({$t_comments}.commenter_id=1 and {$t_comments}.comment_type=2)) \n\t\tand {$t_comments}.comment_status = 0)";
$data = $dbo->getAll($datasql);
return $data;
}