mirror of
https://github.com/flarum/framework.git
synced 2025-02-20 23:24:55 +08:00
Ensure compatibility with DB table prefix
This commit is contained in:
parent
716428882d
commit
6b67263f01
@ -75,9 +75,9 @@ class PinStickiedDiscussionsToTop
|
|||||||
$read = $query->newQuery()
|
$read = $query->newQuery()
|
||||||
->selectRaw(1)
|
->selectRaw(1)
|
||||||
->from('users_discussions as sticky')
|
->from('users_discussions as sticky')
|
||||||
->whereRaw('sticky.discussion_id = id')
|
->whereColumn('sticky.discussion_id', 'id')
|
||||||
->where('sticky.user_id', '=', $search->getActor()->id)
|
->where('sticky.user_id', '=', $search->getActor()->id)
|
||||||
->whereRaw('sticky.read_number >= last_post_number');
|
->whereColumn('sticky.read_number', '>=', 'last_post_number');
|
||||||
|
|
||||||
// Add the bindings manually (rather than as the second
|
// Add the bindings manually (rather than as the second
|
||||||
// argument in orderByRaw) for now due to a bug in Laravel which
|
// argument in orderByRaw) for now due to a bug in Laravel which
|
||||||
|
Loading…
x
Reference in New Issue
Block a user