我正在运行这个 SQL 查询:
SELECT wp_woocommerce_order_items.order_id As No_Commande
FROM wp_woocommerce_order_items
LEFT JOIN
(
SELECT meta_value As Prenom
FROM wp_postmeta
WHERE meta_key = '_shipping_first_name'
) AS a
ON wp_woocommerce_order_items.order_id = a.post_id
WHERE wp_woocommerce_order_items.order_id =2198
我得到这个错误:
#1054 - 'on 子句'中的未知列'a.post_id'。
我认为我的代码很简单,但我做不到。我究竟做错了什么?