add quotes around table named "user" when quote_identifiers is true
This commit is contained in:
parent
3722b90a27
commit
788dd66dbe
@ -896,10 +896,14 @@ class Notice extends Memcached_DataObject
|
||||
{
|
||||
$user = new User();
|
||||
|
||||
if(common_config('db','quote_identifiers'))
|
||||
$user_table = '"user"';
|
||||
else $user_table = 'user';
|
||||
|
||||
$qry =
|
||||
'SELECT id ' .
|
||||
'FROM user JOIN subscription '.
|
||||
'ON user.id = subscription.subscriber ' .
|
||||
'FROM '. $user_table .' JOIN subscription '.
|
||||
'ON '. $user_table .'.id = subscription.subscriber ' .
|
||||
'WHERE subscription.subscribed = %d ';
|
||||
|
||||
$user->query(sprintf($qry, $this->profile_id));
|
||||
|
Loading…
Reference in New Issue
Block a user