From 351f21c89fd8ad2e30dffa60735d6d14bcbce3a2 Mon Sep 17 00:00:00 2001 From: ilu33 Date: Sat, 22 Oct 2016 05:52:29 +0200 Subject: Postgres complaining again ... ```sql UPDATE abook SET abook_profile = (SELECT profile_guid AS FROM profile WHERE is_default = 1 AND uid = 13 LIMIT 1) WHERE abook_profile = '' AND abook_channel = 13 ; returned false ERROR: syntax error at or near "profile" LINE 1: ... SET abook_profile = (SELECT profile_guid AS FROM profile WH... ^ ``` --- Zotlabs/Module/Profiles.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Module/Profiles.php b/Zotlabs/Module/Profiles.php index 127304f92..19a642a83 100644 --- a/Zotlabs/Module/Profiles.php +++ b/Zotlabs/Module/Profiles.php @@ -31,7 +31,7 @@ class Profiles extends \Zotlabs\Web\Controller { // move every contact using this profile as their default to the user default - $r = q("UPDATE abook SET abook_profile = (SELECT profile_guid AS FROM profile WHERE is_default = 1 AND uid = %d LIMIT 1) WHERE abook_profile = '%s' AND abook_channel = %d ", + $r = q("UPDATE abook SET abook_profile = (SELECT profile_guid FROM profile WHERE is_default = 1 AND uid = %d LIMIT 1) WHERE abook_profile = '%s' AND abook_channel = %d ", intval(local_channel()), dbesc($profile_guid), intval(local_channel()) -- cgit v1.2.3