Solved

Help with some SQL to import one table to another table

Posted on 2012-03-28
2
431 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
.htaccess 5 33
php function to remove a file 31 39
hasing a url 16 23
Fulfillment API php code sample 1 37
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
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 …

815 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

13 Experts available now in Live!

Get 1:1 Help Now