[SCRIPTS] Fix postgres incompatible query in clean_profiles.php
This commit is contained in:
parent
4153a93390
commit
2a82f2774d
@ -47,10 +47,11 @@ if (!have_option('y', 'yes')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
print "Deleting";
|
print "Deleting";
|
||||||
|
$user_table = common_database_tablename('user');
|
||||||
$profile = new Profile();
|
$profile = new Profile();
|
||||||
$profile->query('SELECT * FROM profile WHERE ' .
|
$profile->query('SELECT * FROM profile WHERE ' .
|
||||||
'NOT (SELECT COUNT(*) FROM notice WHERE profile_id=profile.id) ' .
|
'NOT (SELECT COUNT(*) FROM notice WHERE profile_id=profile.id) ' .
|
||||||
'AND NOT (SELECT COUNT(*) FROM user WHERE user.id=profile.id) ' .
|
"AND NOT (SELECT COUNT(*) FROM {$user_table} WHERE user.id=profile.id) " .
|
||||||
'AND NOT (SELECT COUNT(*) FROM user_group WHERE user_group.profile_id=profile.id) ' .
|
'AND NOT (SELECT COUNT(*) FROM user_group WHERE user_group.profile_id=profile.id) ' .
|
||||||
'AND NOT (SELECT COUNT(*) FROM subscription WHERE subscriber=profile.id OR subscribed=profile.id) ');
|
'AND NOT (SELECT COUNT(*) FROM subscription WHERE subscriber=profile.id OR subscribed=profile.id) ');
|
||||||
while ($profile->fetch()) {
|
while ($profile->fetch()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user