Welcome to Geeklog, Anonymous Saturday, December 21 2024 @ 07:35 am EST
Geeklog Forums
Conversion from CSV to sql
antonio
Anonymous
Hi
sometime ago I exported the full database of my geeklog website into a csv file
now i'd need to import it again into a new geeklog database, but phpmyadmin only accepts
sql files as input.
How can I reconvert the original db to sql?
any help would be appreciated
Cheers
Antonio
sometime ago I exported the full database of my geeklog website into a csv file
now i'd need to import it again into a new geeklog database, but phpmyadmin only accepts
sql files as input.
How can I reconvert the original db to sql?
any help would be appreciated
Cheers
Antonio
16
9
Quote
Antonio
Anonymous
Hi
I just would like to add, that I can't, right now do a full back-up of my web
because it is down, and the actual host provider has forbidden execs() on the data base for (apparently) security reasons.
So it would be important for me to rebuild the DB from what I have, which is an older CSV file.
Any help would be appreciated
Cheers
Antonio
I just would like to add, that I can't, right now do a full back-up of my web
because it is down, and the actual host provider has forbidden execs() on the data base for (apparently) security reasons.
So it would be important for me to rebuild the DB from what I have, which is an older CSV file.
Any help would be appreciated
Cheers
Antonio
18
14
Quote
Status: offline
suprsidr
Forum User
Full Member
Registered: 12/29/04
Posts: 555
Location:Champaign, Illinois
Google search reveals http://www.codewalkers.com/c/a/Database-Code/CSV-to-SQL-convertor/
-s
FlashYourWeb and Your Gallery with the E2 XML Media Player for Gallery2 - http://www.flashyourweb.com
-s
FlashYourWeb and Your Gallery with the E2 XML Media Player for Gallery2 - http://www.flashyourweb.com
13
10
Quote
Antonio
Anonymous
Hi
thanks, but the cuestion is that the geeklog DB has many different tables and the data in CVS files are "flat" data, without the table reference information.
So how do I feed the correct data to the correct table? How can I tell the converter where one table data starts and finishes?
all the best
Antonio
thanks, but the cuestion is that the geeklog DB has many different tables and the data in CVS files are "flat" data, without the table reference information.
So how do I feed the correct data to the correct table? How can I tell the converter where one table data starts and finishes?
all the best
Antonio
13
13
Quote
Status: offline
suprsidr
Forum User
Full Member
Registered: 12/29/04
Posts: 555
Location:Champaign, Illinois
I just did a test export to cvs on a small development gl site.
Exporting one table at a time would have been the preferred method for cvs.
After adjusting the php on the above tool so it would work w/ php5 it looks promising for creation of sql inserts.
But you'll have to separate and name the tables yourself which certainly won't be easy.(Using an editor that knows what the line breaks are like Eclipse makes it a bit easier)
As I said - separating the tables at export would have made things easier.
You'll also likely need the same version of gl database for insert as well. Newer gl has extra columns for many key tables.
So to re-cap:
Whew!
Worth it?
-s
FlashYourWeb and Your Gallery with the E2 XML Media Player for Gallery2 - http://www.flashyourweb.com
Exporting one table at a time would have been the preferred method for cvs.
After adjusting the php on the above tool so it would work w/ php5 it looks promising for creation of sql inserts.
But you'll have to separate and name the tables yourself which certainly won't be easy.(Using an editor that knows what the line breaks are like Eclipse makes it a bit easier)
As I said - separating the tables at export would have made things easier.
You'll also likely need the same version of gl database for insert as well. Newer gl has extra columns for many key tables.
So to re-cap:
- Install the same old version of geeklog so the db has the same table structure.
- Manually separate the tables in your cvs file
- Use the cvs->sql tool to convert to inserts
- Perform the inserts
- Make sure the old version of gl is operational w/ inserted data
- Re-export to SQL
- import/update to GL1.6.1
Whew!
Worth it?
-s
FlashYourWeb and Your Gallery with the E2 XML Media Player for Gallery2 - http://www.flashyourweb.com
12
9
Quote
Status: offline
Laugh
Site Admin
Admin
Registered: 09/27/05
Posts: 1470
Location:Canada
Quote by: antonio
Hi
sometime ago I exported the full database of my geeklog website into a csv file
now i'd need to import it again into a new geeklog database, but phpmyadmin only accepts
sql files as input.
How can I reconvert the original db to sql?
any help would be appreciated
Cheers
Antonio
Actually phpMyAdmin does accept csv file to import data but not for the entire database just for individual tables. Click on a table and then click the import tab to see all the options avaialble. So if your csv file contains data for all the tables you will have to manually break up the one file into a file for each table.
One of the Geeklog Core Developers.
21
14
Quote
Louise
Anonymous
The quickest way is to use a conversion tool like SQLizer.io.
It’ll convert xlsx, xls, or csv to SQL in seconds and give you properly formatted table and INSERT data. It’ll literally save you hours over manually doing it or writing a script.
You can also convert XML and JSON files with SQLizer.
It’ll convert xlsx, xls, or csv to SQL in seconds and give you properly formatted table and INSERT data. It’ll literally save you hours over manually doing it or writing a script.
You can also convert XML and JSON files with SQLizer.
10
13
Quote
All times are EST. The time is now 07:35 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content