Use exists() for some SQL statements; send thank-you email to patron donors who donate again

This commit is contained in:
Alex Cabal 2024-05-13 12:32:07 -05:00
parent a4910b8d67
commit a442f92e28
3 changed files with 41 additions and 19 deletions

View file

@ -25,10 +25,11 @@ try{
$isUserAgentAllowed = false;
if(isset($_SERVER['HTTP_USER_AGENT'])){
$isUserAgentAllowed = Db::QueryInt('
SELECT count(*)
from FeedUserAgents
where instr(?, UserAgent)
limit 1
SELECT exists(
select *
from FeedUserAgents
where instr(?, UserAgent)
)
', [$_SERVER['HTTP_USER_AGENT']]);
}