|
|
|
พี่ๆช่วยดูโค้ดให้หน่อยน่ะค่ะ ว่าผิดเงื่อนไขยังไงค่ะ ทำไมถึงรันออกมาผิดพลาด |
|
|
|
|
|
|
|
พี่ๆช่วยหน่อยน่ะค่ะ ว่าทำไมถึงมีข้อผิดพลาดค่ะ ขอคำแนะนำด้วยค่ะ
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ผลการเรียนรู้</title>
<style type="text/css">
<!--
.style1 {
font-family: "sr FahTHAI";
font-size: 18px;
}
.style10 {
font-size: 24px;
font-weight: bold;
}
-->
</style>
</head>
<body>
<form action="EV_LEARNING_SAVE.php" method="post" name="EV_LEARNING_SAVE.php" id="EV_LEARNING_SAVE.php">
</td>
</tr>
<tr>
<td height="9" colspan="2" align="center" bgcolor="#FFFFFF"><table width="700" border="0" align="center">
<tr>
<td height="297" align="center"><table width="700" height="182" border="0" bordercolor="#FF99CC">
<tr>
<td height="44" align="left" valign="middle" bgcolor="#FFFFFF" border="0"><table width="300" border="0" bordercolor="#FF00FF">
<tr>
<td width="250" align="center" bgcolor="#FFFFFF" class="style1"><span class="style10"><font color="#000000"> เกณฑ์มาตรฐาน TQF</font></span></td></tr></table></tr>
<tr>
<td height="9" align="left" valign="bottom" bgcolor="#FFFFFF"><table width="300" border="0" align="left">
<tr>
<td width="150" align="right" class="style1"><font color="#000000">ปีการศึกษา :</font></td>
<td width="150" align="left" class="style1"><select name="ACADYEAR" id="ACADYEAR">
<option value=" ">--เลือก--</option>
<?PHP for($i=2012; $i<=date("Y"); $i++) {?>
<option value="<? echo $i; ?>"> <? echo $i+543; ?></option>
<?PHP }?>
</select></td>
</tr>
</table></td>
</tr>
<tr>
<td height="9" align="left" valign="middle" bgcolor="#FFFFFF"><table width="400" border="0">
</table>
<table width="300" border="0" align="left">
<tr>
<td width="150" align="right" class="style1"><font color="#000000"> เทอม:</font></td>
<td width="150" align="left" class="style1"><select name="SEMESTER" id="SEMESTER">
<option>--เลือก--</option>
<option value="1">1</option>
<option value="2">2</option>
</select></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="9" align="left" valign="top" bgcolor="#FFFFFF"><table width="470" border="0" align="left">
<tr>
<td width="147" align="right" class="style1"><font color="#000000">สาขาวิชา:</font></td>
<td width="313" height="9" class="style1">
<?
include ("connect_db.php");
$strSQL = "SELECT DISTINCT EVALUATE.TQF.PROGRAMID,AVSREG.PROGRAM.PROGRAMNAME FROM AVSREG.PROGRAM INNER JOIN EVALUATE.TQF ON AVSREG.PROGRAM.PROGRAMID= EVALUATE.TQF.PROGRAMID ";
$objParse = oci_parse ($objConnect, $strSQL);
oci_execute ($objParse,OCI_DEFAULT);
?>
<select name="PROGRAMID" id="PROGRAMID">
<option value="["PROGRAMID"]" > ---เลือก--- </option>
<?
while($objResult = oci_fetch_array($objParse,OCI_BOTH))
{
?>
<option value="<?=$objResult["PROGRAMID"];?>"><?=$objResult["PROGRAMNAME"];?></option>
<?
}
?>
<?
oci_close($objConnect);
?>
</select></td></tr></table></td></tr>
<tr>
<td height="9" align="left" valign="top" bgcolor="#FFFFFF">
<table width="200" border="0" align="center">
<tr>
<td align="left" bgcolor="#FFFFFF"><p>
<?
include ("connect_db.php");
$strSQL = "SELECT EVALUATE.TQF.TQF_ID,EVALUATE.TQF.PROGRAMID,EVALUATE.TQF.DESCRIPTION FROM EVALUATE.TQF ORDER BY TQF_ID ASC ";
$objParse = oci_parse ($objConnect, $strSQL);
oci_execute ($objParse,OCI_DEFAULT);
$Per_Page =10; // Per Page
$Page = $_GET["Page"];
if(!$_GET["Page"])
{
$Page=1;
}
$Prev_Page = $Page-1;
$Next_Page = $Page+1;
$Page_Start = (($Per_Page*$Page)-$Per_Page);
if($Num_Rows<=$Per_Page)
{
$Num_Pages =1;
}
else if(($Num_Rows % $Per_Page)==0)
{
$Num_Pages =($Num_Rows/$Per_Page) ;
}
else
{
$Num_Pages =($Num_Rows/$Per_Page)+1;
$Num_Pages = (int)$Num_Pages;
}
$sql=" order by TQF_ID desc LIMIT $Page_Start , $Per_Page";
$objParse = oci_parse ($objConnect, $strSQL);
?>
</p>
<table width="652" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#DDDDDD">
<tr>
<th width="73" height="29" align="center" bordercolor="" bgcolor="#FFCCFF"> </th>
<th width="508" align="center" bgcolor="#FFCCFF"><span class="style1"><font color="#000000">เกณฑ์ TQF </font></span></th>
<th width="63" align="center" bgcolor="#FFCCFF"><span class="style1"><font color="#000000">เลือก</font></span></th>
</tr>
<?
while($objResult = oci_fetch_array($objParse,OCI_BOTH))
{
?>
<tr>
<td width="73" height="36" align="center" bgcolor="#FFFFFF"><span class="style1">
<font color="#000000"><?=$objResult["TQF_ID"];?></font>
</span></td>
<td width="508" align="left" bgcolor="#FFFFFF">
<span class="style1">
<font color="#000000"><?=$objResult["DESCRIPTION"];?></font>
</a></span></td>
<td width="63" align="center" bgcolor="#FFFFFF">
<span class="style1">
<input type="checkbox" name="checkbox" value='".$objResult['TQF_ID']."' />
</a></span></td></tr>
<?
}
?>
</table>
<?
oci_close($objConnect);
?></td>
</tr>
</table></td>
</tr>
</table>
<span class="style1">
<input type="submit" name="submit2" value=" บันทึก " />
</span></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2" align="center" bgcolor="#EEEEEE"></td>
</tr>
</form>
</body>
</html>
Tag : PHP, Oracle
|
|
|
|
|
|
Date :
2012-03-09 07:55:31 |
By :
comerror |
View :
982 |
Reply :
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code (PHP)
$strSQL = "SELECT DISTINCT EVALUATE.TQF.PROGRAMID,AVSREG.PROGRAM.PROGRAMNAME FROM AVSREG.PROGRAM INNER JOIN EVALUATE.TQF ON AVSREG.PROGRAM.PROGRAMID= EVALUATE.TQF.PROGRAMID ";
echo $strSQL; // echo ดูว่าค่าที่ได้ถูกหรือไม่
|
|
|
|
|
Date :
2012-03-09 08:40:12 |
By :
HaKonNan |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 02
|