|
|
|
[report] เกี่ยวกับการดึงข้อมูลรายงาน รบกวนผู้รู้ ช่วยตรวจสอบให้ทีครับ |
|
|
|
|
|
|
|
ใหนโค้ดอ่ะครับ
|
|
|
|
|
Date :
2010-10-19 13:22:06 |
By :
deawx |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code (PHP)
<? if(!empty($search)){?>
<table border="1" cellspacing="0" cellpadding="0" bordercolor="#000000" bordercolordark="#FFFFFF" width="100%" align="center">
<tr bgcolor="DDDDDD" height="25">
<td align="center" width="58"><div align="center"><b>ลำดับ </b></div></td>
<td width="197" align="center"><div align="center"><b>วันที่จอง </b></div></td>
<td width="275" align="center"><div align="center"><b>ชื่อลูกค้า</b></div></td>
<td width="127" align="center"><div align="center"><b>ที่นั่ง </b></div></td>
<td width="150" align="center"><div align="center"><b>ต้นทาง </b></div></td>
<td width="149" align="center"><div align="center"><b>ปลายทาง </b></div></td>
<td align="center" width="127"><div align="center"><b>ราคาตั๋ว</div></td>
</tr>
<?
if($sel=="3"){
$year=$year-543;
$sqlb = mysql_db_query("$dbname","SELECT distinct(reserve.Customer_ID), reserve_day, Seat, route_id FROM reserve,route where substr(reserve_day,7,4) like '%$year%' and Customer_ID!='0', route_id='$rowsqlb=[route_name]'");}
else if($sel=="2"){
$sqlb = mysql_db_query("$dbname","SELECT distinct(reserve.Customer_ID),reserve_day,Seat FROM reserve where substr(reserve_day,4,2) like '%$month%' and Customer_ID!='0'");}
else{
$sqlb = mysql_db_query("$dbname","SELECT distinct(reserve.Customer_ID),reserve_day,Seat FROM reserve where reserve_day= '$day' and Customer_ID!='0'");}
$a=0;
while($rowsqlb=mysql_fetch_array($sqlb)){
$sql = mysql_db_query("$dbname","SELECT sum(busroute.Price) FROM busroute,reserve where busroute.BusRoute_ID=reserve.BusRoute_ID and reserve.Customer_ID='$rowsqlb[Customer_ID]' order by sum(busroute.Price) desc");
$rowsql=mysql_fetch_array($sql);
$n=$n+1;
if ( $color == "#C3D9FF"){
$color = "#f7f7f7";}
else {
$color = "#C3D9FF";}
?>
<tr bgcolor="<?=$color?>">
<td align="center"><div align="center">
<?= echo $n; ?>
</div></td>
<td align="left"><div align="left">
<? $sqlc = mysql_db_query("$dbname","SELECT reserve_day FROM reserve where reserve_day='$rowsqlb[reserve_day]'");
$rowsqlc=mysql_fetch_array($sqlc);
echo $rowsqlc[reserve_day]; ?>
<td align="right">
<? $sqlc = mysql_db_query("$dbname","SELECT FirstName ,LastName FROM customer where Customer_ID='$rowsqlb[0]'");
$rowsqlc=mysql_fetch_array($sqlc);
echo $rowsqlc[FirstName]."".$rowsqlc[LastName]; ?>
<td align="right">
<div align="center">
<?
$sqlc = mysql_db_query("$dbname","SELECT Seat FROM reserve where Seat='$rowsqlb[Seat]'");
$rowsqlc=mysql_fetch_array($sqlc);//
echo $rowsqlc[Seat];?>
</div></td>
<td align="right">
<div align="center">
<? $sqlc = mysql_db_query("$dbname","SELECT route_name FROM route where route_name='$rowsqlb[route_name]'");
$rowsqlc=mysql_fetch_array($sqlc);
echo $rowsqlc[route_name]; ?>
</div></td>
<td align="right">
<div align="center">
<? $sqltr=mysql_db_query("$dbname","SELECT * FROM route where route_id='$rowshow[destination]'");
$rowtr=mysql_fetch_array($sqltr);
echo $rowtr[route_name]; ?>
</div></td>
<td align="right">
<div align="center">
<?=$rowshow[Price];?>
</div>
</tr>
<?}?>
</table>
|
ประวัติการแก้ไข 2010-10-19 13:29:11
|
|
|
|
Date :
2010-10-19 13:26:34 |
By :
marchzada |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ไม่เป็นภาษาไทย โทษทีครับมือใหม่
|
|
|
|
|
Date :
2010-10-19 13:27:41 |
By :
marchzada |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
มั่วหน่อยนะครับ
|
|
|
|
|
Date :
2010-10-19 13:33:04 |
By :
marchzada |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 00
|