 |
|
code เป็นแบบนี้
<?php
session_start();
include("connect.php");
$pro= mysql_query("select * from project where mon_pro = '$mon_pro1' && year_pro = '$year_pro1'");
$id_p = mysql_result($pro,0,"id_pro");
$per= mysql_query("select * from per_project where id_pro = '$id_p' order by id_per asc");
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>ระบบอบรม/สัมมนาและนิทรรศการ</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<link href="style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body { background-color: #FFFFFF }
body,td,th {
font-size: 12px;
font-family: tahoma;
}
.style8 { font-size: 12px;
color: #FFFFFF;
font-family: tahoma;
}
.style9 { font-family: tahoma;
font-size: 12px;
}
.style20 {font-size: 12px;
font-weight: bold;
}
.style22 {color: #000000}
-->
</style>
</head>
<body topmargin="0" onLoad="window.print();window.close();">
<div align="center">
<table width="100%" border="0" cellpadding="2" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td width="100%" height="15" align="left" valign="bottom"><div align="center"></div></td>
</tr>
<tr>
<td height="28" align="left" valign="bottom"><div align="center" class="style20">รายงานข้อมูลการอบรม/สัมมนา</div>
<div align="center"></div></td>
</tr>
<tr >
<td height="18" align="left" valign="bottom"><div align="center"></div></td>
</tr>
<tr >
<td height="15" align="left" valign="bottom"><div align="center" class="style20"><strong>ประจำเดือน <?php echo "$mon_pro1"; ?> ปี <?php echo "$year_pro1"; ?></strong></div></td>
</tr>
<tr >
<td height="15" align="left" valign="bottom"><div align="center"></div></td>
</tr>
<tr>
<td><div align="center">
<table width="100%" height="67" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#000000" bgcolor="#FFFFFF">
<tr bgcolor="#FFFFFF">
<td width="36" align="center" ><span class="style22">ลำดับ</span></td>
<td width="248" align="center" ><span class="style22">ชื่อการอบรม/สัมมนา</span></td>
<td width="116" align="center" ><span class="style22">วันที่</span></td>
<td width="100" align="center" ><span class="style22">เวลา</span></td>
<td width="132" align="center" ><span class="style22">สถานที่ </span></td>
<td width="143" align="center" ><span class="style22">หน่วยงาน</span></td>
<td width="231" align="center" ><span class="style22">ผู้รับผิดชอบ</span></td>
</tr>
<?php
if(mysql_num_rows($pro) != 0)
{
for($i = 0;$i < mysql_num_rows($pro);$i++)
{
?>
<tr bgcolor="#FFFFFF" >
<td height="25" align="center" ><span class=""><?php echo $i+1; ?></span></td>
<td width="248" align="left"> <?php echo mysql_result($pro,$i,"n_project"); ?></td>
<td align="left"><div align="center"><?php echo mysql_result($pro,$i,"date_pro"); ?> <?php echo mysql_result($pro,$i,"mon_pro"); ?> <?php echo mysql_result($pro,$i,"year_pro"); ?></div></td>
<td align="left"><div align="center"><?php echo mysql_result($pro,$i,"time_pro"); ?> น.</div></td>
<td align="left" bgcolor="#FFFFFF"><div align="left"> <?php echo mysql_result($pro,$i,"location"); ?></div></td>
<td align="left" bgcolor="#FFFFFF"><div align="left"> <?php echo mysql_result($pro,$i,"insti"); ?></div></td>
<td align="left"><table width="100%" border="0" cellpadding="1" cellspacing="1" bordercolor="#000000">
<?php
if(mysql_num_rows($per) != 0)
{
for($t= 0;$t < mysql_num_rows($per);$t++)
{
?>
<tr>
<td><? echo $t+1;?>.
<?php
$id_p = mysql_result($per,$t,"id_per");
$p_pro= mysql_query("select * from person where id_per = '$id_p' order by id_per asc");
echo mysql_result($p_pro,0,"prefix");
echo mysql_result($p_pro,0,"p_name");
?></td>
</tr>
<?php }
}
else
{?>
<tr>
<td></td>
</tr>
<?php } ?>
</table></td>
</tr>
<?php }
}
else
{?>
<tr bgcolor="#FFFFFF" >
<td colspan="7" align="center"><div align="center" class="style9">
<p>ไม่พบข้อมูล</p>
</div></td>
</tr>
<?php } ?>
</table>
</div></td>
</tr>
<tr>
<td height="18"><div align="center"><span class="style11 style8"> </span> </div></td>
</tr>
<div align="center"> </div>
</table>
</div>
</body>
</html>
***************************************************************************************************
รายงานข้อมูลการอบรม/สัมมนา :
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 4 in C:\AppServ\www\seminar\p_report_project_data.php on line 46
ประจำเดือน
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 4 in C:\AppServ\www\seminar\p_report_project_data.php on line 53
ปี
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 4 in C:\AppServ\www\seminar\p_report_project_data.php on line 53
เป็นแบบนี้อ่า
Tag : - - - -
|
|
 |
 |
 |
 |
Date :
2010-06-08 11:35:31 |
By :
kabton_hok |
View :
958 |
Reply :
4 |
|
 |
 |
 |
 |
|
|
|
 |