Answer by Derek Downey for Query between two related tables
Use a LEFT JOIN and check for null values. Something like:SELECT profile.* FROM user_profile profile LEFT JOIN user_friend friend1 ON friend1.user_profile1_id = user_profile_id LEFT JOIN user_friend...
View ArticleQuery between two related tables
I have two tables. One of them (user_profile table) has a field named "user_profile_id" and the other one (user_friend table) has two fields named "user_profile1_id" and "user_profile2_id" which are FK...
View Article
More Pages to Explore .....