fix search
This commit is contained in:
parent
e68af4dc96
commit
a9f65bb798
|
@ -17,7 +17,7 @@ export default (router, tpl) => {
|
||||||
total = (await db`
|
total = (await db`
|
||||||
select count(*) as total
|
select count(*) as total
|
||||||
from "items"
|
from "items"
|
||||||
where src ilike ${'%' + tag.substring(4) + '%'}
|
where src ilike ${'%' + tag.substring(4) + '%'} and active = 'true'
|
||||||
group by "items".id
|
group by "items".id
|
||||||
`).length;
|
`).length;
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ export default (router, tpl) => {
|
||||||
from "items"
|
from "items"
|
||||||
where
|
where
|
||||||
src ilike ${'%' + tag.substring(4) + '%'} and
|
src ilike ${'%' + tag.substring(4) + '%'} and
|
||||||
active = 1
|
active = 'true'
|
||||||
group by "items".id
|
group by "items".id
|
||||||
order by "items".id desc
|
order by "items".id desc
|
||||||
offset ${offset}
|
offset ${offset}
|
||||||
|
@ -55,7 +55,7 @@ export default (router, tpl) => {
|
||||||
from "tags"
|
from "tags"
|
||||||
left join "tags_assign" on "tags_assign".tag_id = "tags".id
|
left join "tags_assign" on "tags_assign".tag_id = "tags".id
|
||||||
left join "items" on "items".id = "tags_assign".item_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
|
group by "items".id, "tags".tag
|
||||||
offset ${offset}
|
offset ${offset}
|
||||||
limit ${_eps}
|
limit ${_eps}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user