我正在运行此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'。
我认为我的代码很简单,但是我做错了。我究竟做错了什么?