hello my project is web discussion forum..i want to get some values of topic table and some values of user table.

in topic table have user id field how can i get user name againts user id.

user table have user id field thanks in advance ....

Recommended Answers

SELECT t.field1, t.field2, u.username
FROM topic t
INNER JOIN user u
    ON t.user_id = u.user_id;
Jump to Post

That's great mani508. Could you mark the thread solved? Thanks!

Jump to Post

All 5 Replies

SELECT t.field1, t.field2, u.username
FROM topic t
INNER JOIN user u
    ON t.user_id = u.user_id;

ok thanks alot i got it.....

That's great mani508. Could you mark the thread solved? Thanks!

how can i marked i m new i don't know??

There should be a "Mark Question Solved" button at the bottom of the post.

Be a part of the DaniWeb community

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