I have a bit of an understanding of how a join works in a SQL query, but it's really basic and I can't quite get my head around it enough to figure out how to do what I need.
Here's the situation. I have two tables, one named pages which has columns (amongst others) called create_id and modified_id and a second table named uses which has id as a key and a column (amongst others) called realname.
What I want to do is SELECT * from pages, but in addition to create_id and modified_id I also want to look these id's up in the users table and return the realname that corresponds to each of these id's as well.
I hope my question makes sense. Thanks in advance for your help, and let me know if I'm not being clear enough :happysad:
Edit:
I should probably add that I'm hoping to do this with just one SQL query if I can.
Here's the situation. I have two tables, one named pages which has columns (amongst others) called create_id and modified_id and a second table named uses which has id as a key and a column (amongst others) called realname.
What I want to do is SELECT * from pages, but in addition to create_id and modified_id I also want to look these id's up in the users table and return the realname that corresponds to each of these id's as well.
I hope my question makes sense. Thanks in advance for your help, and let me know if I'm not being clear enough :happysad:
Edit:
I should probably add that I'm hoping to do this with just one SQL query if I can.
Last edited: