SELECT Query with two foreign keys to one table
Okay, here's my newest problem:
So I've got a table, it has an ID to a User and to a Manager, both of which are stored in a seperate table, but both are in the same table (basically, managers are also users). In my view, I do an INNER JOIN on the Users table for both the User and Manager, but it pulls the same records out for both. Basically, my join looks like:
u is my users table, et is the table with the user id and er is the table with the manager id. I know there's a way to do this, but I can't remember how:(. Any ideas?
INNER JOIN u.USER_ID = et.ENG_ID OR u.USER_ID = er.ENG_MAN