]> git.mxchange.org Git - friendica.git/commitdiff
query to find un-grouped contacts
authorfriendica <info@friendica.com>
Thu, 12 Apr 2012 14:48:28 +0000 (07:48 -0700)
committerfriendica <info@friendica.com>
Thu, 12 Apr 2012 14:48:28 +0000 (07:48 -0700)
include/Contact.php

index ee434cb6db4f3f201d390ee8678bad331e42a1a4..8d893cf70e7b6e0204fb3b0d792b1f82dab80b49 100644 (file)
@@ -173,4 +173,15 @@ function random_profile() {
        if(count($r))
                return dirname($r[0]['url']);
        return '';
-}
\ No newline at end of file
+}
+
+
+function contacts_not_grouped($uid) {
+       $r = q("select * from contact where uid = %d and self = 0 and id not in (select distinct(`contact-id`) from group_member where uid = %d) ",
+               intval($uid),
+               intval($uid)
+       );
+
+       return $r;
+}
+