1
dbCount, er2 = dbmap.SelectInt("SELECT COUNT(*) AS N FROM (SELECT av.id FROM Table av LEFT JOIN Table2 dt ON dt.`app_id` = av.`app_id` LEFT JOIN Table3 a ON a.`id` = av.`app_id` WHERE dt.`user_id` IN (?) OR a.`org_id` IN (?) GROUP BY av.id LIMIT ? OFFSET ?) tmp", user_id, org_ids, limit, offset)

user_id = 1000
org_ids = 13444,12444,10333
limit = 25
offset = 0

知道为什么这在 GO 中没有返回错误或结果,但是当直接在数据库上运行时返回 1 个结果?也没有错误。

4

0 回答 0