此查询中的语法错误是什么?我无法修复。
SELECT
wsd.sid,
wsd.data as node_id
FROM
webform_submitted_data wsd
JOIN (
SELECT
wsd.sid,
wsd.data as md_email
FROM
webform_submitted_data wsd
WHERE
wsd.nid=48 AND wsd.cid=5
) tbl_md_email tmm ON tmm.sid = wsd.sid
WHERE
wsd.nid=48 AND wsd.cid=4
最佳答案
尝试这个:
SELECT
wsd.sid,
wsd.data AS node_id
FROM
webform_submitted_data AS wsd
JOIN
(
SELECT
sid,
data AS md_email
FROM
webform_submitted_data
WHERE
nid=48 AND cid=5
) AS tmm ON tmm.sid = wsd.sid
WHERE
wsd.nid=48 AND wsd.cid=4;