-1
我有書本表和類別表。我也有從類別表中生成的數據下拉列表。我希望用戶將書籍表中的類別從5更改爲9.在我的下拉列表中,我將值賦給了類別ID。我怎樣才能從下拉列表中的類ID的價值,並與新的類別ID如何更新表中的外鍵值
+------------+---------+----------------+
| Books |
+------------+---------+----------------+
| bookID | bName |categoryID (FK) |
+------------+---------+----------------+
| 1 |some text|5 |
| 2 |some text|9 |
+------------+---------+----------------+
+------------+---------+
| category |
+------------+---------+
| categoryID |cat name |
+------------+---------+
| 5 |fiction |
| 9 |history |
+------------+---------+