Mostrar el usuario que no es amigo del usuario que inició sesión sql

I have tow SQL table with name CUENTAS BARATAS y AMIGOS y


  • $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");

preguntado el 27 de agosto de 11 a las 21:08

What is the SQL error? where !isfriend is probably where it is choking. Not sure what you are trying to do there. -

1 Respuestas

it's probably because sql_query nor sql_counts function is defined.

Deberías usar

mysql_num_rows() and mysql_query()

*Sure this answer applies only if they are not your own functions

Respondido 28 ago 11, 01:08

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.