【发布时间】:2017-09-15 11:33:09
【问题描述】:
这是我的 where 子句:
->where( 'post_type', '=', 'blog' )
有没有办法用通配符替换“博客”,所以它会匹配任何“post_type”?
完整查询:
$db = ( new DbSql() )->db()->getConnection();
$postsCount = $db->table( 'posts' )
->where( 'status', '=', 'published' )
->where( 'post_type', '=', 'blog' )
->where( 'alerts', '<', Settings::CONTENT_ALERT_NUMBER_ALLOWANCE )
->count() ?? null;
【问题讨论】:
-
删除语句
标签: laravel laravel-5 eloquent laravel-eloquent