Decrease scope of query in Profile::getEventsReminderHTML

- Use specific SELECT fields
- Use INNER JOIN
This commit is contained in:
Hypolite Petovan 2018-04-22 04:41:53 -04:00
parent 08afec3170
commit e0b33b36a2

View file

@ -646,9 +646,9 @@ class Profile
$self = dba::selectFirst('contact', ['id'], ['uid' => local_user(), 'self' => true]);
$s = dba::p(
"SELECT *
"SELECT `event`.*
FROM `event`
JOIN `item`
INNER JOIN `item`
ON `item`.`uid` = `event`.`uid`
AND `item`.`parent-uri` = `event`.`uri`
WHERE `event`.`uid` = ?