I figured I would start a new thread since other people might have this same question. I discovered that my old cgi guestbook stored its entries in a csv type file. All the fields are separated nicely when I open it in a CSV editor.
I would like to know how to get those entries into the SQL database for Phoca Guestbook.
I should also mention that I don't know any SQL commands, but I am able to navigate in PhpMyAdmin fairly well.
How to import entries from CSV format into Phoca's SQL?
- Jan
- Phoca Hero
- Posts: 48738
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
The problem will be
The problem will be maybe the database structure... has your old guestbook the same columns as Phoca Gallery have? if not, CSV import doesn't help...
PhpMyAdmin, I think is the best way... store old data in SQL file and then instert this SQL file into a new table (but only in case the columns and columns types are the same)
PhpMyAdmin, I think is the best way... store old data in SQL file and then instert this SQL file into a new table (but only in case the columns and columns types are the same)
If you find Phoca extensions useful, please support the project
-
- Phoca Enthusiast
- Posts: 85
- Joined: 10 May 2008, 21:11
I've hired the
I've hired the developer of my old guestbook to import the entries into your guestbook, including those dates. He can format the CSV file to have the same fields as the phoca guestbook's
- Jan
- Phoca Hero
- Posts: 48738
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
So then just import
So then just import the file into a database (I think, maybe the phpMyAdmin can work with CSV, but I am not sure)
If you find Phoca extensions useful, please support the project
-
- Phoca Enthusiast
- Posts: 85
- Joined: 10 May 2008, 21:11
Maybe I will try to
Maybe I will try to do it myself; Do I just need to make sure the columns in my csv file match the ones in the phoca guestbook sql table?
- Jan
- Phoca Hero
- Posts: 48738
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Yes, the columns mus
Yes, the columns must be the same (count of columns and the same types)
If you find Phoca extensions useful, please support the project
-
- Phoca Enthusiast
- Posts: 85
- Joined: 10 May 2008, 21:11
When you say the sam
When you say the same types, you just mean that that the data in the CSV file columns needs to match what is specified in the table, correct?
- Jan
- Phoca Hero
- Posts: 48738
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Same types means:
Same types means:
text should be text (e.g.: 'some text'
int (integer - number) should be int (e.g '0')
date should be date...
text should be text (e.g.: 'some text'
int (integer - number) should be int (e.g '0')
date should be date...
If you find Phoca extensions useful, please support the project
-
- Phoca Enthusiast
- Posts: 85
- Joined: 10 May 2008, 21:11
Yes, date is the onl
Yes, date is the only one that is giving me a problem for the moment, I will try again tomorrow. Off to sleep now....
- Jan
- Phoca Hero
- Posts: 48738
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
the date should have
the date should have this format:
2008-05-13 16:23:17
2008-05-13 16:23:17
If you find Phoca extensions useful, please support the project