[eluser]skunkbad[/eluser]
I get:
SELECT *
FROM (`users`)
WHERE `user_level` < '6'
OR `user_name` = 'testuser'
AND `user_email` LIKE '%yahoo%'
which is I think what I want... a search through users that are less than level 6, including the logged in user (in this case 'testuser'), with an email that includes "yahoo"
but it returns all users.
Actually, with some testing in phpMyAdmin, I figured that I actually want this query:
SELECT *
FROM (
`users`
)
WHERE (
`user_level` < '6'
OR `user_name` = 'sitemanager'
)
AND `user_email` LIKE '%yahoo%'
LIMIT 0 , 30
but I don't know how to make one using the active record class