好的,所以我通过来自 shopify webhook 测试的 webhook 在我的网络服务器的订单文件夹中获得了 order09-05-12-1346847709.xml 文件,该文件看起来像
..................................................... ..
<processing-method nil="true"></processing-method>
<line-items type="array">
<line-item>
<requires-shipping type="boolean">true</requires-shipping>
<fulfillment-service>manual</fulfillment-service>
<grams type="integer">5000</grams>
<price type="decimal">199.99</price>
<quantity type="integer">1</quantity>
<sku>SKU2006-001</sku>
<title>Sledgehammer</title>
<product-id type="integer" nil="true"></product-id>
<variant-id type="integer" nil="true"></variant-id>
<vendor nil="true"></vendor>
<variant-title nil="true"></variant-title>
<fulfillment-status nil="true"></fulfillment-status>
<name>Sledgehammer</name>
<variant-inventory-management nil="true"></variant-inventory-management>
<properties type="array">
</properties>
</line-item>
<line-item>
<requires-shipping type="boolean">true</requires-shipping>
<fulfillment-service>manual</fulfillment-service>
<grams type="integer">500</grams>
<price type="decimal">29.95</price>
<quantity type="integer">1</quantity>
<sku>SKU2006-020</sku>
<title>Wire Cutter</title>
<product-id type="integer" nil="true"></product-id>
<variant-id type="integer" nil="true"></variant-id>
<vendor nil="true"></vendor>
<variant-title nil="true"></variant-title>
<fulfillment-status nil="true"></fulfillment-status>
<name>Wire Cutter</name>
<variant-inventory-management nil="true"></variant-inventory-management>
<properties type="array">
</properties>
</line-item>
</line-items>
..................................................... ……………………………………………………………………………………………………………………
我只需要选择“sku 和 qty”值,这样我就可以自动更新到我的 ms sql server 的数据我如何使用 php 来做到这一点我的意思是我知道如何使用 sqlsrv 连接到 sql server,但不知道 php 代码选择特定字段的值并将值放入 sql server
PLZ伙计们,我现在很绝望....
非常感谢你们