How can show SQL query in php [duplicate] - Hack The Tech - Latest News related to Computer and Technology

Hack The Tech - Latest News related to Computer and Technology

Get Daily Latest News related to Computer and Technology and hack the world.

Thursday, August 17, 2023

How can show SQL query in php [duplicate]

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"



source https://stackoverflow.com/questions/76916208/how-can-show-sql-query-in-php

No comments:

Post a Comment