Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


xml inventory feed to update database via phpmyadmin (newbie)

From: mafiasam@-----------.---------.---
To: NULL
Date: 2/4/2007 5:27:00 AM

I am a newbie to xml and generally to sql as well...I'm a graphic designer 
and my database experience is limited to Access.

I have a web store with less than 500 products at this time. One of my 
suppliers generates a "real time" (xml) inventory feed updated every two 
hours. I use their product code as a unique identifier in my database. I am 
using the zencart shopping cart (php). My web host uses phpmyadmin on my 
server for the database (sql).

I would like to utilize that real time xml feed to do automated inventory 
updates. I have one major hurdle. (well it's major for me)

The xml feed from the supplier looks like this...

<Products><Product 
toBeDiscontinued="N"><ProductCode><![CDATA[00-238X1]]></ProductCode><InventoryLevel>249</InventoryLevel></Product>

while the xml I download via phpmyadmin for my site looks like this...

<products>
        <products_quantity>2604</products_quantity>
        <products_model>10-papc25c</products_model>
    </products>

so basically I will have to change or reference "ProductCode" to update 
"products_model" and likewise for "InventoryLevel" and "products_quantity".
And when the "products_model" does not exist I do not want it added to my 
database and I do not want other suppliers products being deleted from my 
database. 

One other thing: when importing the results phpmyadmin requires a text file.

So that is my basic dilemna.

I want to be able to automate the process as much as possible. I am positive 
that the solution is easier than I am making it out to be.

Looking forward to a reply. 

Thanks


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent