I have this query with this php code and can't show the result in echo, I can convert to string?
//conexion is my function to conect to DB and is done
$costTotal=conexion();
$costTotal=$costTotal->query("SELECT SUM(product_cost) FROM product");
echo $costTotal;
For example expected string(5)"18000"