diff options
author | friendica <info@friendica.com> | 2012-04-12 07:48:28 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-04-12 07:48:28 -0700 |
commit | 73487989c0a27deae38881379b052c5002b225ae (patch) | |
tree | 4668fbb9b5cfcb1688bbeb8b9dd81ff213131b95 /include/Contact.php | |
parent | 60871555f539caec07f2dcfe37f11fc090bac1be (diff) | |
download | volse-hubzilla-73487989c0a27deae38881379b052c5002b225ae.tar.gz volse-hubzilla-73487989c0a27deae38881379b052c5002b225ae.tar.bz2 volse-hubzilla-73487989c0a27deae38881379b052c5002b225ae.zip |
query to find un-grouped contacts
Diffstat (limited to 'include/Contact.php')
-rw-r--r-- | include/Contact.php | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/Contact.php b/include/Contact.php index ee434cb6d..8d893cf70 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -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; +} + |