Click here to Skip to main content
15,916,846 members
Home / Discussions / Database
   

Database

 
AnswerRe: Access database to SQL Pin
Bernhard Hiller25-Nov-10 23:19
Bernhard Hiller25-Nov-10 23:19 
AnswerRe: Access database to SQL Pin
Eddy Vluggen27-Nov-10 22:34
professionalEddy Vluggen27-Nov-10 22:34 
QuestionHow to access SQL Azure database from local computer Pin
bhaskar_bhardwaj24-Nov-10 21:52
bhaskar_bhardwaj24-Nov-10 21:52 
AnswerRe: How to access SQL Azure database from local computer Pin
Mycroft Holmes24-Nov-10 22:27
professionalMycroft Holmes24-Nov-10 22:27 
Questionconvert varchar to bigint Pin
Jassim Rahma24-Nov-10 3:31
Jassim Rahma24-Nov-10 3:31 
AnswerRe: convert varchar to bigint Pin
Pete O'Hanlon24-Nov-10 3:47
mvePete O'Hanlon24-Nov-10 3:47 
GeneralRe: convert varchar to bigint Pin
PIEBALDconsult24-Nov-10 4:12
mvePIEBALDconsult24-Nov-10 4:12 
QuestionFurther Help with Select Required Please [modified] Pin
djhankypark23-Nov-10 7:42
djhankypark23-Nov-10 7:42 
The code below which was advised works very well, not sure if it was supposed to be laid out that way and was a little learning curve me but it works Smile | :) am happy. My next problem is this...

SELECT
(FU.id)AS ID1,
(TU.id)AS ID2,
(FU.username)AS Username1,
(TU.username)AS Username2,
(FU.level)AS level1,(TU.level)AS level2,
(NU.Profile_Image)AS Image1,
(MU.Profile_Image)AS Image2,
comments.comment
FROM comments
JOIN login as FU ON comments.Artist = FU.id  
JOIN login as TU ON comments.Buddy = TU.id
JOIN tbl_profile as NU ON comments.Artist=NU.Usr_AD_ID
JOIN tbl_profile as MU ON comments.Buddy=MU.Usr_AD_ID
WHERE TU.active = 1
ORDER BY comments.commentid DESC LIMIT 10


I have a tbale which is basically a buddies list...

TABLE Structure...
ID
Buddy_ID
Author_ID
Description
Block
Approved

I am not sure how to include this so the comments only show comments from a person that is in a user buddies list, if that makes sense. at the moment it shows all comments from and to everyone. As members have to be logged in to see the page I could grab the users login_id from the session variable which would go against the Author_ID in the buddies list table, so only to show comments form people in his/her buddies list.

Any pointers would be very much appreciated.

King Regards

Ray


-- Modified Tuesday, November 23, 2010 2:00 PM

AnswerRe: Further Help with Select Required Please Pin
Luc Pattyn23-Nov-10 7:51
sitebuilderLuc Pattyn23-Nov-10 7:51 
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 
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 

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.