Hello to all you guys,
i'm working with ebay api, and i'm using call GetOrders.
I'm actually having a problem in storing the xml response into mysql database.
I already parsed it correctly but i cannot figure out how to put data in db.
I've tried to put all data in array but all i can do is write in db only the first row, instead i need to loop all avaiable rows.
The targer is to create a query wich will create a row for any SellingManagerSalesRecordNumber contained in TransactionArray
container with associated SellingManagerSalesRecordNumber cointained in top level (in Orders->ShippingDetails)
For example first Order has two transaction so the result of the query would be to create two rows:
<OrderArray>
<Order>
<ShippingDetails>
<SellingManagerSalesRecordNumber>12658</SellingManagerSalesRecordNumber>
</ShippingDetails>
<TransactionArray>
<Transaction>
<ShippingDetails>
<SellingManagerSalesRecordNumber>12365</SellingManagerSalesRecordNumber>
</ShippingDetails>
</Transaction>
<Transaction>
<ShippingDetails>
<SellingManagerSalesRecordNumber>12398</SellingManagerSalesRecordNumber>
</ShippingDetails>
</Transaction>
</TransactionArray>
</Order>
<Order>
<ShippingDetails>
<SellingManagerSalesRecordNumber>12678</SellingManagerSalesRecordNumber>
</ShippingDetails>
<TransactionArray>
<Transaction>
<ShippingDetails>
<SellingManagerSalesRecordNumber>12678</SellingManagerSalesRecordNumber>
</ShippingDetails>
</Transaction>
</TransactionArray>
</Order>
</OrderArray>
SellingManagerSalesRecordNumber_int | SellingManagerSalesRecordNumber
12635 12658
12398 12658
Instead second order would create only a row:
SellingManagerSalesRecordNumber_int | SellingManagerSalesRecordNumber
12635 12658
12398 12658
12678 12678
Actually parsing it would give as result:
12658|12635|12398|12678|12678
without pipe.
Do you have any clues on how to do that?
Any help would be apreciated.
Thanks in advance.
Problem with mysql query after parsing an xml file
Moderator: General Moderators