master #50
|
@ -17,7 +17,7 @@ export default (router, tpl) => {
|
|||
total = (await db`
|
||||
select count(*) as total
|
||||
from "items"
|
||||
where src ilike ${'%' + tag.substring(4) + '%'}
|
||||
where src ilike ${'%' + tag.substring(4) + '%'} and active = 'true'
|
||||
group by "items".id
|
||||
`).length;
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ export default (router, tpl) => {
|
|||
from "items"
|
||||
where
|
||||
src ilike ${'%' + tag.substring(4) + '%'} and
|
||||
active = 1
|
||||
active = 'true'
|
||||
group by "items".id
|
||||
order by "items".id desc
|
||||
offset ${offset}
|
||||
|
@ -55,7 +55,7 @@ export default (router, tpl) => {
|
|||
from "tags"
|
||||
left join "tags_assign" on "tags_assign".tag_id = "tags".id
|
||||
left join "items" on "items".id = "tags_assign".item_id
|
||||
where "tags".tag ilike ${'%' + tag + '%'} and "items".active = 1
|
||||
where "tags".tag ilike ${'%' + tag + '%'} and "items".active = 'true'
|
||||
group by "items".id, "tags".tag
|
||||
offset ${offset}
|
||||
limit ${_eps}
|
||||
|
|
Loading…
Reference in New Issue
Block a user