cosmetic
This commit is contained in:
parent
b3f9dd1bce
commit
97b7362842
@ -38,7 +38,7 @@ class Utils
|
|||||||
->from($sql->as(dcCore::app()->prefix . dcBlog::POST_TABLE_NAME, 'P'))
|
->from($sql->as(dcCore::app()->prefix . dcBlog::POST_TABLE_NAME, 'P'))
|
||||||
->columns([
|
->columns([
|
||||||
$sql->count('*', 'count'),
|
$sql->count('*', 'count'),
|
||||||
'U.user_id'
|
'U.user_id',
|
||||||
])
|
])
|
||||||
->join(
|
->join(
|
||||||
(new JoinStatement())
|
(new JoinStatement())
|
||||||
@ -55,7 +55,7 @@ class Utils
|
|||||||
->limit(abs((int) $limit));
|
->limit(abs((int) $limit));
|
||||||
|
|
||||||
self::period($sql, $period, 'post_dt');
|
self::period($sql, $period, 'post_dt');
|
||||||
|
|
||||||
$rs = $sql->select();
|
$rs = $sql->select();
|
||||||
|
|
||||||
if (is_null($rs) || $rs->isEmpty()) {
|
if (is_null($rs) || $rs->isEmpty()) {
|
||||||
@ -65,7 +65,7 @@ class Utils
|
|||||||
$res = [];
|
$res = [];
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($rs->fetch()) {
|
while ($rs->fetch()) {
|
||||||
$sql = new SelectStatement();
|
$sql = new SelectStatement();
|
||||||
$user = $sql
|
$user = $sql
|
||||||
->from(dcCore::app()->prefix . dcAuth::USER_TABLE_NAME)
|
->from(dcCore::app()->prefix . dcAuth::USER_TABLE_NAME)
|
||||||
->column('*')
|
->column('*')
|
||||||
@ -120,7 +120,7 @@ class Utils
|
|||||||
->from($sql->as(dcCore::app()->prefix . dcBlog::COMMENT_TABLE_NAME, 'C'))
|
->from($sql->as(dcCore::app()->prefix . dcBlog::COMMENT_TABLE_NAME, 'C'))
|
||||||
->columns([
|
->columns([
|
||||||
$sql->count('*', 'count'),
|
$sql->count('*', 'count'),
|
||||||
'comment_email'
|
'comment_email',
|
||||||
])
|
])
|
||||||
->where('blog_id = ' . $sql->quote(dcCore::app()->blog->id))
|
->where('blog_id = ' . $sql->quote(dcCore::app()->blog->id))
|
||||||
->and('P.post_id = C.post_id')
|
->and('P.post_id = C.post_id')
|
||||||
@ -159,7 +159,7 @@ class Utils
|
|||||||
$res = [];
|
$res = [];
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($rs->fetch()) {
|
while ($rs->fetch()) {
|
||||||
$sql = new SelectStatement();
|
$sql = new SelectStatement();
|
||||||
$user = $sql
|
$user = $sql
|
||||||
->from(dcCore::app()->prefix . dcBlog::COMMENT_TABLE_NAME)
|
->from(dcCore::app()->prefix . dcBlog::COMMENT_TABLE_NAME)
|
||||||
->column('*')
|
->column('*')
|
||||||
|
Loading…
Reference in New Issue
Block a user