|
 |
|
ช่วยดูหน่อยค่ะ jump menu เรียก id ได้แล้ว แต่ไม่แสดงข้อมูลค่ะ |
|
 |
|
|
 |
 |
|
เรียก id ไม่น่าได้ ต้องเรียก value ของ jumpMenu หรือเปล่า
|
 |
 |
 |
 |
Date :
2013-11-04 16:21:00 |
By :
apisitp |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
value จะเรียก id มาได้ apply_all2.php?positionID=18 อย่างนี้ค่ะ
ตอนทำแยกเฉพาะ jump menu มันแสดงได้ แต่พอเอามารวมกับการค้นหาจาก textbox มันกลับไม่แสดง
ตอนนี้ลองย้ายตารางของ jump menu มาไว้ล่างสุด โดยไม่ใส่เงื่อนไข มันแสดงข้อมุลค่ะ แต่กลายเป็นแสดงออกมาทั้ง 2 ตารางเลย
|
 |
 |
 |
 |
Date :
2013-11-04 16:32:37 |
By :
AnnYZaa |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ตอนนี้พอค้นหาจาก textbox ได้ jumpmenu ก็จะไม่ได้ แต่พอ jumpmenu ใช้ได้ ตัว textbox ก็ไม่ได้
มันจะแยกสองส่วนนี้ออกกันยังไงคะ
Code (PHP)
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
<tr>
<td width="518" style="font-size:16px; font-weight:bold;">รายชื่อผู้สมัครงานทั้งหมด</td>
<td width="167" align="right">
<!-- <form action="position_add.php" method="get" name="add">
<div align="center"><input name="" type="submit" value="add" style="cursor:pointer;" /></div>
</form>-->
</td>
</tr>
<tr>
<td style="font-size:16px; font-weight:bold;"> </td>
<td align="right"> </td>
</tr>
<tr>
<td style="font-size:16px; font-weight:bold;"><form name="frmSearch" method="get" action="<?=$_SERVER['SCRIPT_NAME'];?>" onsubmit="return validate();">
ค้นหาจาก ชื่อ-สกุล
<input name="txtKeyword" size="30" type="text" id="txtKeyword" value="<?=$_GET["txtKeyword"];?>" >
<input type="submit" name="imageField" id="imageField" value="ค้นหา" />
</form>
<form>
<select name="jumpMenu" id="jumpMenu" onChange="MM_jumpMenu('parent',this,0)">
<option name="jumpMenu" value="">----แสดงข้อมูลในฐานข้อมูล--------</option>
<?
$strSQL ="select * from position";
$objQuery = mysql_query($strSQL);
while($objResult = mysql_fetch_array($objQuery)){
?>
<option value="apply_all2.php?positionID=<?=$objResult["positionID"];?>" <?php if($_GET['jumpMenu'] == 'positionID'){ ?> checked="checked" <?php } ?>><?=$objResult ["position_name"];?></option>
<?
}
?>
</select>
</form>
</td>
<td align="right"> </td>
</tr>
</table>
<?
if($_GET["txtKeyword"] != "")
{
$strSQL = "SELECT * FROM application WHERE name LIKE '%".$_GET["txtKeyword"]."%'";
}
else if($_GET["txtKeyword"] == "")
{
$strSQL = "SELECT * FROM application";
}
else if($_GET["jumpMenu"] == 'positionID')
{
$strSQL ="SELECT * from application a left join position b on a.positionID=b.positionID where a.positionID='".$_GET ["positionID"]."' ";
}
else if($_GET["jumpMenu"] == "")
{
$strSQL ="SELECT * from application";
}
//$strSQL ="SELECT * from application a left join position b on a.positionID=b.positionID where a.positionID='".$_GET ["positionID"]."' ";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
$objResult = mysql_fetch_array($objQuery);
$Num_Rows = mysql_num_rows($objQuery);
$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;
}
$strSQL .=" Order By appID DESC LIMIT $Page_Start , $Per_Page";
$objQuery = mysql_query($strSQL);
?>
<table width="100%" border="0" class="tbshow" bgcolor="#ccc" align="center" cellpadding="5" cellspacing="1">
<tr>
<td width="50" class="tbshowtr"><div>ลำดับ</div></td>
<td width="250" class="tbshowtr"><div>ชื่อ-สกุล</div></td>
<td width="250" class="tbshowtr"><div>ตำแหน่ง</div></td>
<td width="150" class="tbshowtr"><div>วันที่สมัคร</div></td>
<td width="100" class="tbshowtr"><div>ดูใบสมัคร</div></td>
<td width="100" class="tbshowtr"><div>เอกสาร</div></td>
</tr>
<?
$i=1;
if($Page > 1)
{
$i = ($Per_Page * ($Page-1)) + 1;
}
while($objResult = mysql_fetch_array($objQuery))
{
?>
<tr bgcolor="#fff">
<td><div align="center"><?=$i;?></div></td>
<td align="center"><?=$objResult["name"];?></td>
<td align="center"><?=$objResult["positionName"];?></td>
<td align="center"><?=$objResult["Creatdate"];?></td>
<td align="center"><a href="apply_detail.php?appID=<?=$objResult["appID"];?>"><img src="../../images/view_icon.png" border="0"></a></td>
<td align="center"><a href="../../file/<?=$objResult["resume"];?>"><img src="../../images/dl_icon.png" border="0"></a></td>
</tr>
<?
$i++;
}
?>
</table>
|
 |
 |
 |
 |
Date :
2013-11-05 10:18:59 |
By :
AnnYZaa |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 02
|