Viewing file: xml_fee.php (2.49 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
';
//asset_permanent
$information .= "\n";
//asset_permanent
$information .= "\n";
$dsn_name = "asset";
$username ="";
$password ="";
$connect= odbc_connect($dsn_name, $username, $password) or die("µÔ´µèÍ DSN äÁèä´é");
//selece_database_asset
$sql = "SELECT TBase_budget.id as a, TBase.name, TBase.bye_year, TBase.pirce, TBase_budget.budgetyear ,TBase_budget.amount , TBase.TTypecate_id , TTypeCatagory.id FROM TBase, TBase_budget, TTypeCatagory WHERE (TBase.id = TBase_budget.id) and (TBase.TTypecate_id = TTypeCatagory.id) and ( (TBase.TTypecate_id = '100') or (TBase.TTypecate_id = '101') )and (TBase_budget.budgetyear = 2550)";
$num1=0;
$sum ="";
$sum100 = "";
$sum101 = "";
$sum102 = "";
$execute = odbc_exec($connect, $sql) or die ("àÍç¡«Ô¤ÔÇÊì¤ÓÊÑè§äÁèä´é $sql");
while($row = odbc_fetch_array($execute))
{
$TBase_id=$row['a'];
$TBase_name=$row["name"];
$TBase_bye_year=$row["bye_year"];
$TBase_pirce=$row["pirce"];
$TBase_amount=$row["amount"];
$TTypecate_id=$row["TTypecate_id"];
$num1++;
$information .= "\n";
$information .= "\n";
$information .= "$TBase_id";
$information .= "\n";
$information .= "\n";
$information .= "$TBase_name";
$information .= "\n";
$information .= "\n";
$information .= "$TBase_bye_year";
$information .= "\n";
$information .= "\n";
$information .= "$TBase_pirce";
$information .= "\n";
$information .= "\n";
$information .= "$TBase_amount";
$information .= "\n";
$information .= "\n";
$information .= "$TTypecate_id";
$information .= "\n";
$information .= "\n";
if ($TTypecate_id == '100') {
$sum100 = $sum100 + $TBase_amount;
}
if ($TTypecate_id == '101') {
$sum101 = $sum101 + $TBase_amount;
}
if ($TTypecate_id == '102') {
$sum102 = $sum102 + $TBase_amount;
}
$sum=$sum100+$sum101+$sum102;
}
$information .= "\n";
//sum_asset_permanent
$information .= "\n";
$information .= "$sum100";
$information .= "\n";
$information .= "\n";
$information .= "$sum101";
$information .= "\n";
$information .= "\n";
$information .= "$sum102";
$information .= "\n";
$information .= "\n";
$information .= "$sum";
$information .= "\n";
$information .= "\n";
echo "$information";
?>
bool(false)
|