How can mysql obtain the ID based on the input field data? ?
大印2020-03-23 20:19:46
0
2
1074
I want to enter "Wang Lun" and "Lin Chong" when entering the data in Table 3, and then directly change it to the ID of Table 1 and Table 2 on the third side of Table 3. How to do this has troubled me for several days. Yes, please help
Do not enter a name, just make a select, the value is id
This is the table structure
Table 1 uid uname
1 Song Jiang
2 Li Kui
3 3 Lin Chong
Table 2 tid tname
1 Fight against Wang Lun
2 Attack Zhujiazhuang
3 Conquer Fangla
Table 3 sid uid tid
1 1 2
2 1 3
3 3 1
4 3 2
5 2 3