$main1 = "การพัฒนา พ.5 กลุ่มหลัก/สนับสนุน/ทั่วไป5";
$mysql= "select COUNT(*) from Eventdata inner join Totledata on Eventdata.AttdeeID = Totledata.AttdeeID Where Cost_ctr like '000007%' AND Name_of_the_business_event' ='$main1' " ;
$execute = odbc_exec($connect, $mysql) or die ("เอ็กซิคิวส์คำสั่งไม่ได้");
$TotalX2 = odbc_result($execute,1);
echo "รวม:<b> ".$TotalX2." </b>คน";
?>
Tag : - - - -
Date :
10 มิ.ย. 2551 23:32:32
By :
nutmommam
View :
1883
Reply :
1
No. 1
Guest
Code (PHP)
$objConnect = odbc_connect("mydatabase","","") or die("Error Connect to Database");
$strSQL = "SELECT * FROM customer ORDER BY CustomerID ASC";
$objExec = odbc_exec($objConnect, $strSQL) or die ("Error Execute [".$strSQL."]");
$Num_Rows = 0;
while(odbc_fetch_row($objExec))$Num_Rows++; // Count Record