php - Display Count of Collected and Released Blood Components
102
I'm trying to display the count of collected and released blood table entries with the same name.
I have a table like this
Blood Collection
I would like the output to be something like:
{-code-2}
I am using laravel as a framework...
Answer
Answer
Answer
Solution:
In laravel:
Or if you already have a
BloodCollection
model:then:
Answer
Solution:
When you require that rows become columns of data you would transform the rows using a crosstab query:
Here is an informative post showing the use of these kinds of queries in a more detailed fashion.
In Laravel: