Skip to content

Commit

Permalink
check on var
Browse files Browse the repository at this point in the history
  • Loading branch information
michield committed Oct 17, 2021
1 parent e5922e4 commit 466adc7
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions pages/home.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,17 @@
));
if ($result) {
$row = Sql_Fetch_Assoc($result);
$lastCampaignID = $row['id'];
$lastcampaign = Sql_Fetch_Assoc_Query(sprintf(
'select msg.id as messageid,count(um.viewed) as views, count(um.status) as total,
subject,date_format(sent,"%%e %%M %%Y") as sent,bouncecount as bounced
from %s um
join %s msg on msg.id = um.messageid
where msg.id = %d and um.status = "sent"',
$GLOBALS['tables']['usermessage'], $GLOBALS['tables']['message'], $lastCampaignID
));
if (!empty($row['id'])) {
$lastCampaignID = $row['id'];
$lastcampaign = Sql_Fetch_Assoc_Query(sprintf(
'select msg.id as messageid,count(um.viewed) as views, count(um.status) as total,
subject,date_format(sent,"%%e %%M %%Y") as sent,bouncecount as bounced
from %s um
join %s msg on msg.id = um.messageid
where msg.id = %d and um.status = "sent"',
$GLOBALS['tables']['usermessage'], $GLOBALS['tables']['message'], $lastCampaignID
));
}
}
} else {
$result = Sql_Query(sprintf(
Expand Down

0 comments on commit 466adc7

Please sign in to comment.