fix sql statement
This commit is contained in:
parent
809606c889
commit
4a191db4eb
@ -43,7 +43,7 @@ class FrontendBehaviors
|
|||||||
|
|
||||||
// Get expired dates and post_id
|
// Get expired dates and post_id
|
||||||
$sql = new SelectStatement();
|
$sql = new SelectStatement();
|
||||||
$posts = $sql->from(dcCore::app()->prefix . dcBlog::POST_TABLE_NAME)
|
$posts = $sql->from($sql->as(dcCore::app()->prefix . dcBlog::POST_TABLE_NAME, 'P'))
|
||||||
->columns([
|
->columns([
|
||||||
'P.post_id',
|
'P.post_id',
|
||||||
'P.post_tz',
|
'P.post_tz',
|
||||||
@ -61,7 +61,7 @@ class FrontendBehaviors
|
|||||||
->select();
|
->select();
|
||||||
|
|
||||||
// No expired date
|
// No expired date
|
||||||
if ($posts->isEmpty()) {
|
if (is_null($posts) || $posts->isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user