$sql = "SELECT id,name,user,sum(value) AS total_sum FROM test WHERE user = 'dejaa'";
$query = mysqli_query($conn,$sql);
$result=mysqli_fetch_array($query,MYSQLI_ASSOC);
$sum=$result["total_sum"];
echo number_format($sum,0);
มันขึ้น Fatal error: Call to a member function query() on a non-object in C:\AppServ\www\web\index.php on line 32