problem description
just used gorm for query but encountered some problems. I want to do some mixed query of and and or, but db.Where in gorm is an and query, but if you add .Or () to query, all the conditions will become or. Ask for help from the bosses, if and and mixed query how to achieve it.
related codes
SELECT * FROM users
WHERE (mobile = "1880000000000" or email =" test@test.com") and status=1 ORDER BY users
. id
ASC LIMIT 1