php - suggesting friends that are not already a friend with the user -


i want suggest friends user. need validate if friend suggesting not friend user
have 2 tables called user, friendship

i try code can't proceed coz have no more idea

$sql=“select user.fullname,user.userid users user. userid not       in( select * friendship userid = '$userid') “;   

i'm using php , mysql

try friendship.userid

$sql = "select user.fullname,user.userid users user. userid not   in( select friendship.userid friendship userid = '$userid')"; 

you need check userids friends of user


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -