Now I have three tables: Table 1: pre_common_member_profile: uid (user's uid), gender (gender), birthyear (year of birth), birthmonth (month of birth ), birthday (date of birth) Table 2: pre_home_friend: uid (user's uid), fuid (uid added as a friend) Table 3: pre_home_friend_request: fuid (the person who sent the friend request ), uid (to whom it is sent): query table 1, but certain conditions are excluded. Query the five above in Table 1... mysqlphpsql
Now I have three tables:
Table 1:
Pre_common_member_profile:
Uid (user's uid ),
Gender (gender ),
Birthyear (year of birth ),
Birthmonth (the month of birth ),
Birthday)
Table 2:
Pre_home_friend:
Uid (user's uid ),
Fuid (uid added as a friend)
Table 3:
Pre_home_friend_request:
Fuid (the person who sends the friend request ),
Uid (Sent)
Requirements:
Search for table 1, but exclude certain conditions.
Query the five fields in Table 1. the condition is uid = 570 and uid cannot be equal to (these two conditions: 1. the fuid value of uid = 570 in table 2. 2. fuid = 570 uid value in Table 3 .)
Try to write a statement more efficiently.