Solved

Help with some SQL to import one table to another table

Posted on 2012-03-28
2
427 Views
Last Modified: 2012-06-21
Hi There,
I have successfully imported some products from a virtuemart shopping cart (version 1.1.4, joomla 1.5) to a new install of joomla 2.5 virtuemart 2.0.2.

I did this using csv improved.

My only issue is I cannot seem to get the image paths imported across or the product descriptions.

So i was thinking I could get my hands dirty and do a direct import into the database.

Can anyone help me do this?
0
Comment
Question by:Amanda Watson
2 Comments
 
LVL 24

Accepted Solution

by:
johanntagle earned 500 total points
ID: 37780520
Are they on the same mysql instance?  Then you can just do something like

insert into new_db.new_table (col1, col2, col3) select col1, col2, col3 from old_db.old_table <optional where clause here>;

You just need a user that has access to both databases/schemas.  If they are not on the same mysql instance, do a mysqldump (or export from phpmyadmin as sql statements) of the needed tables from the old database, import to a temporary database on the new mysql instance, then do the same insert operations above.
0
 
LVL 11

Author Closing Comment

by:Amanda Watson
ID: 37783702
Thanks that would have worked, I ended up having a folder permission issue with csv import, and that solved it for me, but your solution would have worked for me also.
Thanks.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now