Let's say you had three tables:
tasks
task_id
task_owner (links to user_id in users table)
task_name
task logs
log_task_id (links to parent task_id in tasks table)
task_log_creator (links to user_id in users table)
task_log_desc
users
user_id
user_name
Now, all I want is a SELECT statement that gets the correct usernames for BOTH:
task_owner
AND
task_log_creator
so I can echo to screen.
I can get either one but not both!
Is this a column alias JOIN question? Forgive me, I am brand new to this. :bemused:
Here is an illustration of what I'm hoping for:
task_name #1 | task_owner
task_log_creator | task_log_desc (task_log #1)
task_log_creator | task_log_desc (task_log #2)
task_log_creator | task_log_desc (task_log #3)
task_name #2 | task_owner
task_log_creator | task_log_desc (task_log #1)
task_log_creator | task_log_desc (task_log #2)
task_log_creator | task_log_desc (task_log #3)
etc.