18 lines
343 B
PHP
18 lines
343 B
PHP
|
|
$query = "SELECT DISTINCT PREVTONS FROM totaltons";
|
|
$result=$conn->query($query);
|
|
$tonsin = 0;
|
|
if ($result->num_rows > 0) {
|
|
// output data of each row
|
|
while($row = $result->fetch_assoc()) {
|
|
$tonsin += $row['PREVTONS'];
|
|
|
|
}
|
|
} else {
|
|
echo "0 results";
|
|
}
|
|
$conn->close();
|
|
|
|
?>
|
|
<?php echo ($tonsin)+133323; ?>
|