QSqlQuery &q = prepare(R"(
SELECT at.title_id, at.aid, at.type, at.language, at.title
FROM anime_title at
+ WHERE at.title ILIKE :query
AND (SELECT count(f.fid) FROM file f WHERE f.aid = at.aid) > 0
- ORDER BY at.title <-> :query ASC
+ ORDER BY at.title <-> :query2 ASC
LIMIT :limit
)");
q.bindValue(":query", query);
+ q.bindValue(":query2", query);
q.bindValue(":limit", limit);
if (!exec(q))