Uploading XML to Mysql using php
Posted on 2011-03-23
I am trying to upload a xml file into Mysql using php. The xml file is layed out pretty easy:
I thought this would be:
$xml = simplexml_load_string($data);
$charname = (string) $xml->Name;
mysql_query("INSERT INTO aTable ( Date,charname, ) VALUES ('$Date','$charname', ') ");
Which inserts one line.I want to be able to insert using the date/time from now and insert Jim and Bob. Could someone give me a example of the Date snippet and how to make it loop from each <member> to the next?