Fix SQL group by and undefined function errors in admin APIs
This commit is contained in:
@@ -45,9 +45,11 @@ try {
|
||||
FROM marketing_campaigns_log";
|
||||
if ($countryCode) {
|
||||
$sqlStats .= " WHERE country_code = :country";
|
||||
$sqlStats .= " GROUP BY message_type";
|
||||
$stmtStats = $con->prepare($sqlStats);
|
||||
$stmtStats->execute([':country' => strtoupper($countryCode)]);
|
||||
} else {
|
||||
$sqlStats .= " GROUP BY message_type";
|
||||
$stmtStats = $con->prepare($sqlStats);
|
||||
$stmtStats->execute();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user