|
 |
|
ช่วยหน่อยคับ ตอนนี้ผมเขียนโปรแกรมเกียวกับการดึงฟิสว์เกี่ยวกับวิชาเรียนของน.ร.อยู่คับ เช่น วิชาภาษาไทย |
|
 |
|
|
 |
 |
|
ตอนนี้ผมเขียนโปรแกรมเกียวกับการดึงฟิสว์เกี่ยวกับวิชาเรียนของน.ร.อยู่คับ เช่น วิชาภาษาไทย ม.1 ว่ามีน.ร. ทั้งหมดกี่คนชื่ออะไรบ้างนะครับ ให้เขียนออกมาในแนวนี้นะครับ แต่ว่าตอนที่ที่ผมเขียนมันขึ้นมาแค่ชื่อเดียวนะครับ ไม่รู่ว่าผมเขียนผิดตรงหรือเปล่าคับช่วยแก้ให้หน่อยคับ ขอขอบคุณล่วงหน้านะครับ (หมายเหตุ ผมได้ใช่ชื่อฟสว์นี้จิงๆๆคับ)
<?php
include("connect_db.inc.php");
$sql="select project_id,project_name from tb_project order by project_id asc;";
$result=odbc_exec($connect,$sql);
$sql2="select * from tb_description";
$result2=odbc_exec($connect,$sql2);
$description = odbc_result($result2, "description");
$nmonth = odbc_result($result2, "nmonth");
$comment = odbc_result($result2, "comment");
echo "<body onload='document.all.description.focus();'>";
echo "<form name='frm' action='save_new_desc.php?project_id=$project_id' method='post' onsubmit='return chk_input();'>";
echo "แก้ไข...<hr>";
odbc_fetch_row($result2);
$description = odbc_result($result2, "description");
echo "กิจกรรม/วิชา : <input type=\"text\" name=\"description\" size=20 value='$description' maxlength=20 \"font-family: Tahoma; font-size: 11px; color: #000000\"><br>";
odbc_fetch_row($result2);
$nmonth = odbc_result($result2, "nmonth");
echo "ชื่อน.ร. : <input type=\"text\" name=\"nmonth\" size=20 value='$nmonth' maxlength=20 \"font-family: Tahoma; font-size: 11px; color: #000000\"><br>";
odbc_fetch_row($result2);
$comment = odbc_result($result2, "comment");
echo "หมายเหตุ : <input type=\"text\" name=\"comment\" size=20 value='$comment' maxlength=20 \"font-family: Tahoma; font-size: 11px; color: #000000\"><br>";
echo "ชั้นเรียน : ";
$p_id="P000000018";//กำหนดตายตัวเลย
while($i<=odbc_fetch_row($result)){
echo "<option value='".odbc_result($result,"project_id")."'>".odbc_result($result,"project_name")."</option>";
$i++;
}
echo "</select>";
echo "</form>";
odbc_close($connect);
?>
Tag : - - - -

|
|
 |
 |
 |
 |
Date :
28 ธ.ค. 2548 11:48:24 |
By :
วัน |
View :
1971 |
Reply :
2 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ตอนนี้ผมเขียนโปรแกรมเกียวกับการดึงฟิสว์เกี่ยวกับวิชาเรียนของน.ร.อยู่คับ เช่น วิชาภาษาไทย ม.1 ว่ามีน.ร. ทั้งหมดกี่คนชื่ออะไรบ้างนะครับ ให้เขียนออกมาในแนวนี้นะครับ แต่ว่าตอนที่ที่ผมเขียนมันขึ้นมาแค่ชื่อเดียวนะครับ ไม่รู่ว่าผมเขียนผิดตรงหรือเปล่าคับช่วยแก้ให้หน่อยคับ ขอขอบคุณล่วงหน้านะครับ (หมายเหตุ ผมได้ใช่ชื่อฟสว์นี้จิงๆๆคับ)
ไมไม่แยกตารางครับ
ตารางนักเรียน
ตารางชั้นเรียน
ตารางวิชาเรียน
แระเอามา จอยกันครับ
ถ้าองโค้ดที่ให้ดูนั้นมันจะโชว์แค่ชื่อคนแรกคนอื่นจะไม่โชว์ 
|
 |
 |
 |
 |
Date :
1 ม.ค. 2549 13:59:38 |
By :
มด |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
Thanks 
|
 |
 |
 |
 |
Date :
2011-04-14 03:55:21 |
By :
EXPERT-PRO |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 03
|