ram4nd Posted March 21, 2010 Share Posted March 21, 2010 I have this sql query: Select mos_users.username, mos_sb_messages_text.message, mos_sb_messages.parent, mos_sb_messages.subject, mos_sb_messages.time, mos_sb_messages.ip from mos_sb_messages, mos_users, mos_sb_messages_text where mos_sb_messages_text.mesid = mos_sb_messages.id and mos_sb_messages.userid = mos_users.id and mos_sb_messages.parent != 0 I want to use the parent field to do a join. I want to join parents to fields that have parents. So it would display parent subject and message in same row with subs. I had hard time trying to explain what I want to do, I hope everybody understands what I try to achieve. Quote Link to comment https://forums.phpfreaks.com/topic/195988-self-join/ Share on other sites More sharing options...
ram4nd Posted March 21, 2010 Author Share Posted March 21, 2010 Got it done by my self allready. Quote Link to comment https://forums.phpfreaks.com/topic/195988-self-join/#findComment-1029628 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.