The name of the table is "hit" and the name of the row that i would like the sum of is "amount" but my code is not working
<?php
$result = $mysqli->query('SELECT sum(amount) FROM hits');
if (FALSE === $result) die("Select sum failed: ".mysqli_error);
$row = mysqli_fetch_row($result);
$sum = $row[0];
print $sum;
?>
The error i get back is "Notice: Use of undefined constant mysqli_error - assumed 'mysqli_error' in ..."