标签: mysql cakephp-3.0
SELECT IF(approved = 1,'Yes','No') AS Status FROM support;
答案 0 :(得分:1)
$supportTable = TableRegistry::get('Support'); $support = $supportTable->find()->select(["status" => "IF(approved = 1,'Yes','No')"])->toArray();
你可以尝试这个