I have a table named as demo with fields id
, department
, createddate
and status.
Now i want to fetch all the data from this table to an array with index of array as department and values from each row with same department in that array for example:
Array[department]((Array[0]=>id
createddate
status)
(Array[1]=>id
createddate
status))
Can any one help me please?