|
 |
|
ช่วยดูให้หน่อยคับ แสดงเอกสารเป็น file excel แต่เวลาดึงมาใช้ภาษามันเพี้ยน |
|
 |
|
|
 |
 |
|
<?
header('Content-type: application/csv');
header('Content-Disposition: attachment; filename=" buy inv report.csv"');
include "../../include/connect.php";
$yearfull = date("Y")+543;
$thaismallmonth=array("ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ตุ.ล.", "พ,ย.","ธ.ค.");
$thaifullmonth=array("มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม", "พฤศจิกายน","ธันวาคม");
echo "รายงานข้อมูลพัสดุที่จัดซื้อทั้งหมด รายงาน ณ.";
echo " ".date ("d")." ".$thaifullmonth[date('m')-1]." ".$yearfull.",\n";
echo "รหัสการสั่งซื้อ,รายการ,จำนวนที่สั่งซื้อ,ราคา,สั่งซื้อจาก,วันที่สั่งซื้อ,ผู้สั่งซื้อ,\n";
mysql_query("set NAMES utf-8");
$sql = "SELECT * FROM tb_buy_inventory ORDER BY buy_id";
$query = mysql_query($sql);
$rows = mysql_num_rows($query);
$i=0;
while ($i < $rows)
{
$result= mysql_fetch_array($query);
echo
"$result[buy_id],$result[inv_name],$result[amount],$result[price],$result[company_name],$result[date],$result[username],\n";
$i++;
}
?>
Tag : - - - -

|
|
 |
 |
 |
 |
Date :
2009-03-26 00:12:20 |
By :
yanae |
View :
1877 |
Reply :
8 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
header("Content-Type: text/html; charset=TIS-620");
|
 |
 |
 |
 |
Date :
2009-03-26 00:14:35 |
By :
plakrim |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ลองดูแล้วแต่มันไม่ขึ้นสักที
|
 |
 |
 |
 |
Date :
2009-03-26 00:17:42 |
By :
yanae |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
มันแสดงแบบนี้ ในฐานข้อมูลเป็นภาษาไทย
เธฃเธฒเธขเธเธฒเธเธเนเธญเธกเธนเธฅเธเธฑเธชเธ?เธธเธ?เธตเนเธเธฑเธ?เธเธทเนเธญเธ?เธฑเนเธเธซเธกเธ? เธฃเธฒเธขเธเธฒเธ เธ?.เธงเธฑเธเธ?เธตเน 26 เธกเธตเธเธฒเธเธก 2552
เธฃเธซเธฑเธชเธเธฒเธฃเธชเธฑเนเธเธเธทเนเธญ เธฃเธฒเธขเธเธฒเธฃ เธเธณเธเธงเธเธ?เธตเนเธชเธฑเนเธเธเธทเนเธญ เธฃเธฒเธเธฒ เธชเธฑเนเธเธเธทเนเธญเธเธฒเธ เธงเธฑเธเธ?เธตเนเธชเธฑเนเธเธเธทเนเธญ เธเธนเนเธชเธฑเนเธเธเธทเนเธญ
เธชเธช 0027.3/3/0003 เธ 0 33 3/24/2552 staff
เธชเธช 0027.3/3/0004 เธ 0 2 3/24/2552 staff
เธชเธช 0027.3/3/0005 เธกเธตเธ? 50 40 เธ.เธเธ.เธเธณเธเธฑเธ? 3/24/2552 staff
เธชเธช 0027.3/3/0006 เธ 30 30 เธ.เธเธ.เธเธณเธเธฑเธ? 3/24/2552 staff
|
 |
 |
 |
 |
Date :
2009-03-26 00:34:45 |
By :
yanae |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
iconv("UTF-8", "TIS-620", $result[inv_name])
|
 |
 |
 |
 |
Date :
2009-03-26 00:41:03 |
By :
plakrim |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขึ้นแล้วบางส่วนแต่งยังไม่สมบรูณ์
|
 |
 |
 |
 |
Date :
2009-04-04 01:15:26 |
By :
yanae |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอดูโคตรล่าสุดหน่อยครับ
|
 |
 |
 |
 |
Date :
2009-04-04 01:28:05 |
By :
plakrim |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 04
|