Click here to Skip to main content
15,914,070 members
Home / Discussions / Database
   

Database

 
GeneralRe: Further Help with Select Required Please Pin
djhankypark23-Nov-10 8:05
djhankypark23-Nov-10 8:05 
GeneralRe: Further Help with Select Required Please Pin
Luc Pattyn23-Nov-10 8:08
sitebuilderLuc Pattyn23-Nov-10 8:08 
GeneralRe: Further Help with Select Required Please Pin
djhankypark23-Nov-10 8:16
djhankypark23-Nov-10 8:16 
GeneralRe: Further Help with Select Required Please Pin
Luc Pattyn23-Nov-10 8:43
sitebuilderLuc Pattyn23-Nov-10 8:43 
GeneralRe: Further Help with Select Required Please Pin
Corporal Agarn23-Nov-10 9:49
professionalCorporal Agarn23-Nov-10 9:49 
GeneralRe: Further Help with Select Required Please Pin
Luc Pattyn23-Nov-10 10:16
sitebuilderLuc Pattyn23-Nov-10 10:16 
GeneralRe: Further Help with Select Required Please Pin
djhankypark23-Nov-10 11:04
djhankypark23-Nov-10 11:04 
AnswerRe: Further Help with Select Required Please Pin
Luc Pattyn23-Nov-10 11:29
sitebuilderLuc Pattyn23-Nov-10 11:29 
Waw. Nicely presented, and almost perfect.
I must admit I'm still confused about the meaning of the buddy list, it seems somehow either redundant or possibly conflicting with the comments table, that also links authors to buddies. If you only want comments beteen author-buddy pairs that exist in the buddylist table, you shouldn't store artist_ID and buddy_ID in comments, you should instead have a buddylist_ID in there.

I am assuming:
1. that "logged in" and "active" are synonyms
2. that the login table as shown does not fit the query results
2A. that "Query Result Required if Lacey is logged in" really means Lacey and Eric are the only ones "active"
2B. that "Query Result Required if Eric is logged in" really means Eric is the only one "active"


If all the assumptions are correct, I think you'd need to replace
WHERE TU.active = 1

by
WHERE FU.active = 1


Could it be that simple?

FYI: my original codes FU and TU stand for FromUser and ToUser (aliases are most useful when short but still understandable, I had better explained them explicitly from the start).

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.


GeneralRe: Further Help with Select Required Please Pin
djhankypark23-Nov-10 12:13
djhankypark23-Nov-10 12:13 
GeneralRe: Further Help with Select Required Please Pin
Luc Pattyn23-Nov-10 12:32
sitebuilderLuc Pattyn23-Nov-10 12:32 
GeneralRe: Further Help with Select Required Please Pin
djhankypark23-Nov-10 13:01
djhankypark23-Nov-10 13:01 
GeneralRe: Further Help with Select Required Please [modified] Pin
Luc Pattyn23-Nov-10 13:16
sitebuilderLuc Pattyn23-Nov-10 13:16 
GeneralRe: Further Help with Select Required Please Pin
djhankypark23-Nov-10 13:33
djhankypark23-Nov-10 13:33 
GeneralRe: Further Help with Select Required Please Pin
Luc Pattyn23-Nov-10 13:37
sitebuilderLuc Pattyn23-Nov-10 13:37 
GeneralRe: Further Help with Select Required Please Pin
djhankypark23-Nov-10 14:17
djhankypark23-Nov-10 14:17 
AnswerRe: Further Help with Select Required Please Pin
Luc Pattyn23-Nov-10 14:15
sitebuilderLuc Pattyn23-Nov-10 14:15 
GeneralRe: Further Help with Select Required Please Pin
djhankypark23-Nov-10 14:24
djhankypark23-Nov-10 14:24 
GeneralRe: Further Help with Select Required Please Pin
Luc Pattyn23-Nov-10 14:48
sitebuilderLuc Pattyn23-Nov-10 14:48 
QuestionDatabase design Pin
digicd123-Nov-10 7:31
digicd123-Nov-10 7:31 
AnswerRe: Database design Pin
fjdiewornncalwe23-Nov-10 7:51
professionalfjdiewornncalwe23-Nov-10 7:51 
AnswerRe: Database design Pin
Eddy Vluggen23-Nov-10 7:54
professionalEddy Vluggen23-Nov-10 7:54 
GeneralRe: Database design Pin
digicd123-Nov-10 8:04
digicd123-Nov-10 8:04 
GeneralRe: Database design Pin
Eddy Vluggen23-Nov-10 8:33
professionalEddy Vluggen23-Nov-10 8:33 
GeneralRe: Database design Pin
digicd124-Nov-10 3:38
digicd124-Nov-10 3:38 
GeneralRe: Database design Pin
Eddy Vluggen24-Nov-10 7:20
professionalEddy Vluggen24-Nov-10 7:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.