[英]How to insert data into two table related by foreign key relation in sql php
[英]How to insert a relation between two tables, where a determined data set is related to a primary key?
如何設計數據庫如下:
表格1:
TagID Tag Strength
===== ===== ========
1 Feather 0
2 Paws 100
3 Beak 150
4 Wings 150
表2:
SpeciesID Species TagID (Relation)
========= ======= =====
B1 Bird 4
B1 Bird 1
B1 Bird 3
B2 Bird 2
B2 Bird 1
B2 Bird 3
B2 Bird 4
B3 Bird 2
B3 Bird 1
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.