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

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 developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.