From: Evan Prodromou Date: Tue, 27 Sep 2011 15:32:05 +0000 (-0400) Subject: Query errors in Profile_tag X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5ccae1313c7c84bf4552ab5f91f905995e167714;p=quix0rs-gnu-social.git Query errors in Profile_tag --- diff --git a/classes/Profile_tag.php b/classes/Profile_tag.php index 0d90d4da14..07ed160d19 100644 --- a/classes/Profile_tag.php +++ b/classes/Profile_tag.php @@ -100,13 +100,13 @@ class Profile_tag extends Managed_DataObject { $ptag = new Profile_tag(); - $qry = sprint('select profile_tag.tag '. - 'from profile_tag join profile_list '. - ' on (profile_tag.tagger = profile_list.tagger ' . - ' and profile_tag.tag = profile_list.tag) ' . - 'where profile_tag.tagger = %d ' . - 'and profile_tag.tagged = %d ', - $tagger, $tagged); + $qry = sprintf('select profile_tag.tag '. + 'from profile_tag join profile_list '. + ' on (profile_tag.tagger = profile_list.tagger ' . + ' and profile_tag.tag = profile_list.tag) ' . + 'where profile_tag.tagger = %d ' . + 'and profile_tag.tagged = %d ', + $tagger, $tagged); if ($auth_user_id != $tagger) { $qry .= 'and profile_list.private = 0'; @@ -114,7 +114,7 @@ class Profile_tag extends Managed_DataObject $tags = array(); - $ptag->query($sql); + $ptag->query($qry); while ($ptag->fetch()) { $tags[] = $ptag->tag;