Reputation: 382
SELECT IF(approved = 1,'Yes','No') AS Status
FROM support;
Upvotes: 0
Views: 245
Reputation: 34
$supportTable = TableRegistry::get('Support');
$support = $supportTable->find()->select(["status" => "IF(approved = 1,'Yes','No')"])->toArray();
You can try this one
Upvotes: 1