Data convertion for MySQL
Posted: Wed Nov 11, 2009 4:06 pm
Hi, I am having the following problem:
I need to convert table data into some format suitable for insertion into MySQL database. The problem is that database is normalized. So i need this:
converted into:
+ some script that would insert data into join table. Also some author tags contain multiple authors. Any ideas?
I need to convert table data into some format suitable for insertion into MySQL database. The problem is that database is normalized. So i need this:
Code: Select all
<tr><td class="picture" ><img src="images/1.jpg" width="150" height="130" /></td>
<td class="title">Book 1</td>
<td class="author">John Smith</td>
<td class="price">1034</td>
</tr>
Code: Select all
"INSERT INTO Books
(Picture,Title,Price)
VALUES
("images/1.jpg","Book 1","1034")";
"INSERT INTO Authors
(Author)
Values
("John Smith")";