我有SQL语句:
SELECT `id`, `un`, `last_active`
FROM `users`
WHERE (`company_id` = :company_id
AND `un` LIKE :un
AND `id` != :id
AND `id` != :id)
ORDER BY id DESC
LIMIT 1
但这不能正常工作,因为我怀疑重复组件id
未正确测试。
那么我怎样才能拥有id!=1 AND id!=7