|
 |
|
สอบถามการ insert แบบแปลก ๆ นี้ด้วย ครับ ไม่รู้ว่าจะ เขียน insert อย่างไร |
|
 |
|
|
 |
 |
|
ใน table_A ผมดึงขึ้นมาแยก ครับ เพาะมี 2 ชั้น เช่น 01 SOM มี 2 ชั้น คือ ชั้น แรก มี 100 ชั้นที่ 2 ก็ มี 100 ชั้นที่ 2 เวลา insert table_B ให้แทนค่า ID_B ให้แทนค่า 0 ส่วน NAME ให้ แทนด้วย คำว่า WD ประมาณนี้ ครับ
table_A
ID_,NAME, NUM
01,SOM,100
02,JAN,300
03,DRAM,500
04,ARM,400
----------------------
table_A ดึงมาแล้วแยกค่าใส่ใน texbox ได้หน้าตาออกมาเป็นแบบนี้ครับ แล้ว insert ลง table_B ตอนนี้ insert ได้แล้ว ครับ แต่ติดที่ว่า จะ insert อย่างไร ให้ ค่าที่แยกออก เป็น 2 ค่า เช่น 01 SOM มี 100 ตอนนี้แยกค่า อีก 100 มาใส่ใน texbox อีกอันได้แล้ว ครับ แต่ไม่รู้จะ บันทึกลง table_B อย่างไร
ID_,NAME, NUM,NUM_1
01,SOM,100,100
02,JAN,300,300
03,DRAM,500
04,ARM,400

----------------------
table_B
ID_B,NAME,NUM,NUM_1
01,SOM,100
0,WD,100
02,JAN,300
0,WD,300
03,DRAM,500
04,ARM,400
## ลืมบอกครับ table_A ดึงมาจากฐานข้อมูลแล้ว เก็บค่าไว้ใน texbox ครับ
Tag : PHP, HTML/CSS, Action Script, Ajax, jQuery

|
ประวัติการแก้ไข 2014-01-03 16:41:24 2014-01-03 16:57:24
|
 |
 |
 |
 |
Date :
2014-01-03 16:32:14 |
By :
rock_rock |
View :
617 |
Reply :
1 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
งงคำถามนิดนึงนะครับ ลองทำเป็น step ไปครับดึงออกมาก่อน แล้วค่อยไป insert ลงอีกตาราง ว่าแต่ต้องการจะทำอะไร อยากได้ผลลัพธ์ออกมาเป็นแบบไหน ครับ 
|
 |
 |
 |
 |
Date :
2014-01-03 16:41:51 |
By :
Manussawin |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 03
|