<?php
require(DIR_INCLUDE.'data.php');
$sql_amount = "SELECT SUM(Amount) AS Expr1 FROM Purchase WHERE DealerId = '$DealerId'";
$execute_amount = odbc_exec($connect,$sql_amount) or die ("เอ็กซิคิวส์คำสั่งไม่ได้");
echo $Expr1;
odbc_close($connect);
?>
<?php
require(DIR_INCLUDE.'data.php');
$sql_amount = "SELECT SUM(Amount) AS Expr1 FROM Purchase WHERE DealerId = '$DealerId'";
$execute_amount = odbc_exec($connect,$sql_amount) or die ("เอ็กซิคิวส์คำสั่งไม่ได้");