[eluser]stormbytes[/eluser]
What are the steps to follow to build the following query using ActiveRecord? (Read the manual...)
Code:
SELECT
Concat(u.user_first_name, ' ', u.user_last_name) AS User,
a.account_numb AS Account,
s.state AS State
FROM
Users AS u
INNER JOIN Accounts AS a
ON u.user_id = a.user_id
INNER JOIN States AS s
ON u.state_id = States.state_id
I'm having trouble figuring out how to piece this together using db->select() & db->join()
or is it that ActiveRecord is more suited for simple queries? Should I be doing this using db->query?