Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Help with some SQL to import one table to another table

Posted on 2012-03-28
2
Medium Priority
?
442 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 24

Accepted Solution

by:
johanntagle earned 2000 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
In this article, I’ll talk about multi-threaded slave statistics printed in MySQL error log file.
The viewer will learn how to dynamically set the form action using jQuery.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

636 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