how to count some rows in a specific field in mysql tabl3 in codeigniter : i want to get some statistics like below

--------------------------------------
NAME    HIGH    MEDIUM    LOW    TOTAL
--------------------------------------
ali     2       0         1      3
hacen   1       1         0      2
--------------------------------------

from table TASKS

----------------------------------
NAME     ASSIGNED-TO     PERIORITY
----------------------------------
task-1   ali             high
task-2   ali             high
task-3   ali             low
task-4   hacen           high
task-5   hacen           medium
----------------------------------


using codeigniter 3

