【发布时间】:2017-07-30 11:32:01
【问题描述】:
我有两个表 customer 和 customer_pro,其中 customer 表具有自动递增的 customerID 和 customer_pro表的 cus_billId 也是自动递增的。
两个表都有不同的字段,例如 customer = customerID,name,amount,updAmount customer_pro= cus_billID,customerID,month,year.... p>
我想根据当前的 cus_billID 打印来自 customer_pro 的所有信息,以及根据客户表中的 amount 和 updAmount 已选择 客户 ID
我使用什么命令来获得想要的结果?
customer_pro的Html表单输入样例
Select customerID ........(**All **customerID** from customer Table)
Select Month ........
select Year ........
提交
当用户按下 submit 按钮时,所有信息将插入到 customer_pro 表中 并根据自动递增的当前 cus_billID 显示这些信息,并根据客户表显示 amount 和 updAmount 选定的 html 表单 customerID
【问题讨论】:
-
编辑您的问题并提供示例数据和所需结果。然后添加一个使用关键字
JOIN的示例查询。你可能会做对的。 -
欢迎来到 SO。请访问help center 了解询问内容和方式。提示:发布工作和代码