[eluser]gregmax17[/eluser]
Hello, I have been CI for a while and it is a great tool. I have just started to learn how to use the Active Record class (before I did all the query by hand), and I have come to stump using it.
I am trying to do a query like so:
SELECT
`users`.`username`, `users`.`privilege_id`
FROM
`users`, `privileges`
WHERE
`users`.`privilege_id`=`privileges`.`privilege_id`
Using the "query" method this works great, but not with the Active Record. It assumes `privileges`.`privilege_id` is a value. So the query comes back as:
SELECT
`users`.`username`, `users`.`privilege_id`
FROM
`users`, `privileges`
WHERE
`users`.`privilege_id`='privileges.privilege_id'
Of course this doesn't return any results.
Any help would be great, thanks