$objConnect = mysql_connect("localhost","root","123456") or die("Error Connect to Database");
$objDB = mysql_select_db("pharmacy");
mysql_query("SET NAMES 'tis620' ");
$strSQL2 = "SELECT sum(Price_Lot) AS Price_Lot FROM store INNER JOIN drug on store.Drg_Barcode = drug.Drg_Barcode WHERE store.Date BETWEEN '".$year.-$month.-$day."' AND '".$toyear.-$tomonth.-$today."' AND store.Drg_Qtttotal2 > 0 order by store.Date,store.Drg_Name LIMIT 0,10";
$objQuery2 = mysql_query($strSQL2);
$resultData2 = array();
$result2 = mysql_fetch_array($objQuery2);
//$rows2 = mysql_num_rows($objQuery2);
$Total2 = $result2['Price_Lot'];