drsvw88664 2015-01-27 06:17
浏览 46

在一个表中插入带有连接条目的多个条目

I have a person table and destination table in my project i am adding a person on the table and also adding his destination in another table.He can have multiple destination. My question is how best to add the destination of that person

My table looks like this

person_tbl

sys_id

f_name

l_name

age

gender

destination_tbl

sys_id

person_id

continent

country

city

How best to do this kind of inserting in database i am using php pdo i only tried saving one but i am not sure how to deal with multiple entry like this one

UPDATE

for now i am only able to save one entry meaning i am saving using the input text field. I will change it after fill up of input text boxes i will need to put the value in a table from there when there are multiple destination it will add value to table then i will get the value of the entry in table then save it in database. THe next step is cloudy for me i am not sure what is the best approach to save many destination of one person is it best to save each destination or that person?any ideas is a great help

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
    • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
    • ¥500 火焰左右视图、视差(基于双目相机)
    • ¥100 set_link_state
    • ¥15 虚幻5 UE美术毛发渲染
    • ¥15 CVRP 图论 物流运输优化
    • ¥15 Tableau online 嵌入ppt失败
    • ¥100 支付宝网页转账系统不识别账号
    • ¥15 基于单片机的靶位控制系统
    • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)