dbdesigner_2008 0 Newbie Poster

Attached to this thread is the DB schema I've come up with. I'm trying to do an outer join to join the exercises to the submissions regardless if there's a related record in the submissions table.

Trouble is when a user logs in I want to execute this query and it will show all the exercises. In the status column it should say if he's submitted to that particular exercise and if he can still make a submission. But if you use a where clause on the join it will no longer show the exercises that he hasn't submitted to. Is there a way around this?

My original design was to do it as two queries hence it's like the following
step 1 execute query to get alll exercises
step 2 execute query to get all related records based on userid and exerciseid
But this is inefficient am told

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.