I am using this SQL query:
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
And I get this error:
# 1054 - Unknown column "a.post_id" in the "on" section.
I think my code is pretty simple, but I can't do it right. What am I doing wrong?
sql left-join subquery
CharleyXIV May 27 '13 at 15:21 2013-05-27 15:21
source share