次のクエリがあります
select count(*) as cnt, status_code from table1 group by status_code
私が必要とするのは、php で関連する status_code のカウントを取得することです
switch ステートメントがあります
function get_status()
{
switch(n)
{
case 1:
$status = 'Test';
break;
case 2:
....
}
}
私はこのような出力が欲しい
ステータス数
- テスト 5
- 人口10
どうすれば達成できますか。