|
 |
|
ติด query ตรง select ข้อมูลจาก database นิดนึงครับ ช่วยหน่อยนะครับ |
|
 |
|
|
 |
 |
|
ก้อเหงอยู่นี่ไงแป๊ะเอ้ย
|
 |
 |
 |
 |
Date :
2009-09-10 21:45:53 |
By :
gummezaka |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|

|
 |
 |
 |
 |
Date :
2009-09-10 22:29:39 |
By :
plakrim |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
Code (PHP)
<?
echo'<form id="form1" name="form1" method="post" action="testjob.php">
<table width="704" border="1"><tr>';
for($i=1;$i<=9;$i++){
echo'
<td width="72"><label>
<input name="r'.$i.'" type="text" id="r'.$i.'" size="10" />
</label></td>';
}
</tr>
</table>
<p>
<label>
<input type="submit" name="button" id="button" value="Submit" />
</label>
</p>
</form>
?>
file รับค่า
Code (PHP)
<?PHP
include("../connection/connect.php");
for($i=1;$i<=9;$i++){
$temp_name='r'.$i;
if($_POST[$temp_name]<>""){
$condition.=' r'.$i.'='.$_POST[$temp_name].' or';
}
}
.....
?>
ไม่รู้ว่า แบบนี้ พอได้ไหมครับ
|
 |
 |
 |
 |
Date :
2009-09-10 23:20:12 |
By :
nilas |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ต่ออีกหน่อย...นะครับ
Code (PHP)
<?php
$condition=substr($condition,0,-2);
if($condition<>""){
$condition=' where '.$condition;
}
$re=mysql_query("select * from job $condition") or die(mysql_error);
....
?>
|
 |
 |
 |
 |
Date :
2009-09-10 23:25:06 |
By :
nilas |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|

|
 |
 |
 |
 |
Date :
2009-09-11 02:03:56 |
By :
gummezaka |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|

|
 |
 |
 |
 |
Date :
2009-09-11 02:18:20 |
By :
gofgof |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอบคุณมาก ๆ ครับ พี่ ๆ ทุกท่าน
ใช้ได้แล้ว
|
 |
 |
 |
 |
Date :
2009-09-11 17:54:51 |
By :
lhing |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|

|
 |
 |
 |
 |
Date :
2009-09-14 07:52:26 |
By :
taobsd |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 04
|