这是我的桌子。通过加入前2个表我需要在PHP中回答,如第三个表
我尝试了查询
$sql="SELECT
ROUND(duct1.length * duct2.duct_63, 1) as d1,
ROUND(duct1.length * duct2.duct_125, 1) as d2,
ROUND(duct1.length * duct2.duct_250, 1) as d3,
FROM duct1 JOIN duct2";
重复值。请帮帮我..
答案 0 :(得分:1)
JOIN查询就像这样。
SELECT
(field1, field2, field3)
FROM table1
JOIN fieldname
ON table1.field1 = table2.field1
WHERE fieldname = $fieldname
也许这会对你有帮助吗?