I have tow SQL table with name ACCOUNTS and FRIENDS and
- $member['id'] means id of users
- $client['id'] means id of user that is logged in
I want to display the user which is not friend of logged in user I try this code but this give SQL error the code is
$isfriend = sql_counts(sql_query("SELECT * FROM `".tb(开发者_运维问答)."friends` WHERE uid={$member['id']} and fid={$client['id']}"));
$res = sql_query("select * from `".tb()."accounts` where !isfriend order by DESC limit 30");
it's probably because sql_query nor sql_counts function is defined.
You should use
mysql_num_rows() and mysql_query()
*Sure this answer applies only if they are not your own functions
精彩评论