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();
|
$user = new User();
|
||||||
|
|
||||||
|
if(common_config('db','quote_identifiers'))
|
||||||
|
$user_table = '"user"';
|
||||||
|
else $user_table = 'user';
|
||||||
|
|
||||||
$qry =
|
$qry =
|
||||||
'SELECT id ' .
|
'SELECT id ' .
|
||||||
'FROM user JOIN subscription '.
|
'FROM '. $user_table .' JOIN subscription '.
|
||||||
'ON user.id = subscription.subscriber ' .
|
'ON '. $user_table .'.id = subscription.subscriber ' .
|
||||||
'WHERE subscription.subscribed = %d ';
|
'WHERE subscription.subscribed = %d ';
|
||||||
|
|
||||||
$user->query(sprintf($qry, $this->profile_id));
|
$user->query(sprintf($qry, $this->profile_id));
|
||||||
|
Loading…
Reference in New Issue
Block a user