Hello
I am trying to intersect 3 tables in order to return the profile name of the buddies, not just their uidon line 392 of buddylist.module is this sql request : $sql = "SELECT DISTINCT(buddy) FROM {buddylist} b INNER JOIN {users} u ON b.buddy = u.uid WHERE b.uid = %d ORDER BY u.access DESC";i would like to intersect the profile_values table in order to retrieve the fid corresponding to the buddy's real first name.something like :$sql = "SELECT (value) FROM {profile_values} p INNER JOIN {buddylist} b INNER JOIN {users} u ON b.buddy = u.uid AND p.uid=u.uid WHERE b.uid = %d AND p.fid=3 ORDER BY u.access DESC";does that look like i'm high on drugs ?can i inner join 3 tables in 1 sql request, or is there a simpler way, once it returned the uid, to get to those fields returned from table profile_values ?
thanks
- autentifică-te sau înregistrează-te pentru a adăuga comentarii




