•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 391,823 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,681 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser:
Views: 279 | Replies: 0
![]() |
•
•
Join Date: Mar 2008
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 0
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
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
Last edited by dbdesigner_2008 : Mar 12th, 2008 at 7:04 am.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb MySQL Marketplace
- Previous Thread: I am not a developer
- Next Thread: Query syntax not working


Linear Mode