From: Brenda Wallace Date: Fri, 26 Jun 2009 22:31:31 +0000 (+1200) Subject: use quote identifiers on the user table X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=565dec0e213570b2cad3fa11ec42caf5b52ce1c8;p=quix0rs-gnu-social.git use quote identifiers on the user table --- diff --git a/classes/User_group.php b/classes/User_group.php index 27b444705d..b1ab1c2d31 100644 --- a/classes/User_group.php +++ b/classes/User_group.php @@ -275,11 +275,14 @@ class User_group extends Memcached_DataObject // XXX: cache this $user = new User(); + if(common_config('db','quote_identifiers')) + $user_table = '"user"'; + else $user_table = 'user'; $qry = 'SELECT id ' . - 'FROM user JOIN group_member '. - 'ON user.id = group_member.profile_id ' . + 'FROM '. $user_table .' JOIN group_member '. + 'ON '. $user_table .'.id = group_member.profile_id ' . 'WHERE group_member.group_id = %d '; $user->query(sprintf($qry, $this->id));