【发布时间】:2017-01-06 17:30:47
【问题描述】:
我想进行插入查询,它与用户的数据表有一个内部连接。
表格的例子是这样的:
users:
uid | name
users_data:
id | data_id | uid | other fields
data_stocks
id | data_id | quantity
所以我试图插入 data_stocks 与只知道来自 users 的 uid 有关。
有点像这样:
INSERT INTO data_stocks (data_id,quantity)
VALUES (' need to join it some how ','$quantity');
这在 mySQL 中可行吗?
【问题讨论】:
标签: mysql