Doing this:
$total_tipo = $this->chamado->contagem('tipo');
foreach ($total_tipo as $total_tip){
print_r($total_tip);
}
I'm getting this result
stdClass Object
(
[tipo] => 1
[quantidade] => 85
)
stdClass Object
(
[tipo] => 2
[quantidade] => 492
)
stdClass Object
(
[tipo] => 3
[quantidade] => 147
)
stdClass Object
(
[tipo] => 4
[quantidade] => 1
)
But what I want is to display the quantity of a single type, for example:
stdClass Object
(
[tipo] => 1
[quantidade] => 85
)
in this case it would only display 85
To display all quantities I do this
foreach ($total_tipo as $total_tip => $value){
print_r($value->quantidade);
}
854911471
I can not separate so that only the quantity of type 1