我是否正确构造了此多个JOIN?

问题描述

SELECT * 
FROM `wpet_woocommerce_order_items` a 
LEFT JOIN `wpet_woocommerce_order_itemmeta` b ON a.order_item_id = b.order_item_id 
LEFT JOIN `wpet_users` f ON f.ID = b.meta_value AND b.meta_key = 'seller_id' 
LEFT JOIN `wpet_dokan_orders` c  ON a.order_id = c.order_id 
LEFT JOIN `wpet_posts` d ON a.order_id = d.ID   
WHERE a.order_id = " + value.OrderNum + " AND a.order_item_type = 'line_item';

我正在尝试使用API​​从woocommerce中获取各种信息,本质上是订单项,值,行总数和佣金。当API同步时,我会收到一些数据,API仅发布了订单ID( value.OrderNum),我正在使用它来构建查询。 这是woocommerce挂钩...

function send2VendorAPI( $order_id ){
$order = wc_get_order( $order_id );


$data = array(
    'OrderNum'=>$order->get_id(),);

然后,我使用此订单ID来获取所有信息。 感谢您的专家在这里提供的所有建议...

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...