Note that there are some explanatory texts on larger screens.

plurals
  1. POImport XML into MySQL 5.1
    primarykey
    data
    text
    <p>Please excuse my lack of knowledge... I know there is a lot of documentation on the internet related to this but I still don't understand.</p> <p>My situation is this:</p> <p>I have an XML file that I need import and eventually replace daily with.</p> <pre><code> &lt;item&gt; &lt;model&gt;AA311-Pink&lt;/model&gt; &lt;title&gt;1122&lt;/title&gt; &lt;price&gt;19.43&lt;/price&gt; &lt;category&gt;cat&lt;/category&gt; &lt;loc&gt;/AA311.html&lt;/loc&gt; &lt;image&gt;/aa311.jpg&lt;/image&gt; &lt;description&gt;Item Info&lt;/description&gt; &lt;weight&gt;0.45&lt;/weight&gt; &lt;option_type&gt;Color-Color&lt;/option_type&gt; &lt;option_value&gt;Pink-Pink&lt;/option_value&gt; &lt;suggested_retail&gt;51.50&lt;/suggested_retail&gt; &lt;special_handling/&gt; &lt;manufacturer&gt;Tantus&lt;/manufacturer&gt; &lt;manufacturer_code&gt;VB5074 and VB5067&lt;/manufacturer_code&gt; &lt;packaging&gt;Retail Packaging&lt;/packaging&gt; &lt;in_stock&gt;Yes&lt;/in_stock&gt; &lt;lastupdated&gt;2008-11-05 16:35:56&lt;/lastupdated&gt; </code></pre> <p>I need to change a handful of the column names automatically and import them into multiple tables in my database.</p> <p>For instance,</p> <pre><code> &lt;item&gt; &lt;products_model&gt;AA315&lt;/products_model&gt; &lt;products_name&gt;name&lt;/products_name&gt; &lt;price&gt;19.43&lt;/price&gt; &lt;category&gt;cat&lt;/category&gt; &lt;loc&gt;/AA315.html&lt;/loc&gt; &lt;products_image&gt;aa315.jpg&lt;/products_image&gt; &lt;products_description&gt;info&lt;/products_description&gt; &lt;products_weight&gt;0.44&lt;/products_weight&gt; &lt;option_type/&gt; &lt;option_value/&gt; &lt;products_price&gt;51.50&lt;/products_price&gt; &lt;special_handling/&gt; &lt;manufactures_name&gt;Tantus&lt;/manufactures_name&gt; &lt;manufacturer_code&gt;VA5104&lt;/manufacturer_code&gt; &lt;packaging&gt;Retail Packaging&lt;/packaging&gt; &lt;products_status&gt;Yes&lt;/products_status&gt; &lt;products_last_modified&gt;2008-11-05 16:35:27&lt;/products_last_modified&gt; </code></pre> <p>And then import into MySQL DB</p> <p>Columns: products_weight, products_model, products_image, products_price, products_last_modified </p> <p>import into table 'products'</p> <p>Columns: products_description, products_name</p> <p>import into table 'product_description</p> <p>Also what about the product_id that is automatically created? I can send SQL output of table structure.</p> <p>I really apprecaite the help... I am willing to pay some if they are willing to create a fully automated procedure to import this file into my database; I am using Zen Cart to host my shopping cart.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload