我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

如何在表中插入数据,其中一个列名是另一个表的主键?

I'm currently developing an information system wherein the user needs to fill up a form,

I have two tables namely: employee and insurance_company. In the employee table I have a column name named insurance_id wherein it is a primary key of the table insurance_company.

my problem is , I can insert data in the columns of employee table except for the insurance_id column but there is a data in the insurance_company table.

below is the form enter image description here

近期文章

  • 提交不起作用
  • WordPress - 无法直接获取cookie
  • Laravel Model不检索数据
  • TYPO3:图像,缩略图未显示
  • 增量添加<tr> id
  • $ .ajax“POST”上的内部服务器错误500
  • 使用medoo框架将数据从表单插入数据库
  • 检查阵列的一半是否是回文
  • reactPHP进程启动阻塞计时器
  • 执行包含URL编码字符串的MySQLi搜索
  • 执行多个查询然后作为数组输出
  • 使用jQuery ajax在其他数据中发送文件不起作用
  • MySQL + PHP使用DropDown List将产品添加到产品表中以从Category表中选择产品类别
  • Laravel 5.2将应用程序分为两部分,以便进行身份验证,其余部分分开
  • PHP如何preg_match大于/小于文本中间的符号?
  • 在Wordpress上更改x-iframe选项
  • 在服务器备份期间阻止付款
  • MongoDBException:无效的逐个调用
  • 删除单个PHP扩展
  • 如何在jquery中获得UL LI值?

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华