SyncViews Posted April 15, 2008 Share Posted April 15, 2008 tabel users user_id user_name ... tabel pms to from ... The id's from the pms (to and from) tabel match up with the users in the users tabel. I though about doing it like below but thats makes two rows for one pm but I only want one row SELECT users.user_id, users.user_name, pms.pm_id, pms.time, pms.content, pms.subject FROM users, pms WHERE pms.to = users.user_id OR pms.from = users.user_id is there someway I can make it just one row per pm with a result like this? pm_id time content subject to.user_id to.user_name from.user_id from.user_name Quote Link to comment Share on other sites More sharing options...
friedemann_bach Posted April 15, 2008 Share Posted April 15, 2008 What about adding "GROUP BY pms.pm_id" to your query? This should reduce all double entries to one. Quote Link to comment 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.