|
 |
|
ถามเรื่องแก้ไขของ listmenu หน่อยครับ - เวลาแก้ไขอยากให้โชว์ N_Tool ที่บันทึกไว้ในฐานข้อมูล... |
|
 |
|
|
 |
 |
|
ไม่มีครับแล้วโค้ตที่เขียนถูกต้องป่าวครับ
|
 |
 |
 |
 |
Date :
2009-03-10 16:49:55 |
By :
GhostLocal |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ช่วยดูโค้ตให้หน่อยครับงงมากเลย
|
 |
 |
 |
 |
Date :
2009-03-10 18:02:23 |
By :
GhostLocal |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ผมต้องการ update ที่ฟิลล์ tool_id อ่ะครับผมลองลองไปแก้ไขตามที่คุณบอกแล้วผลปรากฎว่า
นี่ครับโค้ต
<select name="tool_id">
<?
include('config.ini.php');
$strSQL = "SELECT * FROM t_tool,t_reampay WHERE Ram_id='".$_GET["Ram_id"]."' ORDER BY tool_id DESC";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
$Num_Rows = mysql_num_rows($objQuery);
$a=0;
while($a < $Num_Rows)
{
$objResult= mysql_fetch_array($objQuery);
?>
<option value=<?=$objResult["tool_id"];?><? if($objResult["tool_id"] == $objResult["tool_id"]) echo "selected"; ?> selected><?=$objResult["N_Tool"];?></option>
<?
$a++;
}
?>
</select>
ผลลัพธ์ที่ได้

|
 |
 |
 |
 |
Date :
2009-03-10 18:40:56 |
By :
GhostLocal |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ผมแก้ตามที่พี่บอกแล้วครับมันดึงtool_idที่มากที่สุดมาแสดงอ่ะครับจะแก้ยังไงหรอครับใกล้วล่ะครับ
|
 |
 |
 |
 |
Date :
2009-03-10 19:08:51 |
By :
GhostLocal |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 01
|