Closed razvanFrandes closed 1 year ago
Hello razvanFrandes.
I haven't implemented a way to get the headers from the response to a request.
But one way to get the number of rows would be to do a search and then use php count
function.
$db = $service->initializeDatabase('products', 'id');
try{
$listProducts = $db->fetchAll()->getResult(); //fetch all products
echo "Total: " . count($listProducts) . " rows on product table";
}
catch(Exception $e){
echo $e->getMessage();
}
How can I get the total rows count of a table ?
Or a better question is how can I get the headers from a response? I added in the service class $header : count => 'exact', but now I need to access the header response.
Thank you