doctor_james Posted September 27, 2007 Share Posted September 27, 2007 Hi guys . suppose I have three tables as folllowing : 1- entries (id,title,entry) -> table of articles . 2- users (id,user_id,entry_id) -> entries users have read . 3- users (id,user) -> list of users . now I want users just to see those entries they haven't read , how can I do that ? thanks in advance . Quote Link to comment Share on other sites More sharing options...
jaymc Posted September 27, 2007 Share Posted September 27, 2007 $q = "SELECT entries.*, users.* from entries LEFT JOIN users ON users.entry_id != entries.id" I think that will work It assumes entries.id and users.entry_id are the unique identified for your articles 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.