Author Topic: Import address book from older version?  (Read 2576 times)

Offline rosslaird

  • Newbie
  • *
  • Posts: 3
Import address book from older version?
« on: December 15, 2007, 02:42:53 PM »

I have upgraded to the newest version, but after having some difficulty with the upgrade I decided just to create a new database to hold the data. The old database is still there, and it has my address book in it. Is there a way (there must be a way) to import those addresses into the address book for the new version? (I can copy and paste an SQL query, and I can follow instructions, but that's about the extent of my database knowledge.)

Ross

Offline rosslaird

  • Newbie
  • *
  • Posts: 3
Re: Import address book from older version?
« Reply #1 on: December 17, 2007, 12:40:00 AM »
OK, I solved it after poking around. For others who might be interested, here's what I did:

In the phpmyadmin interface, I selected the contacts table from the older version and exported it to an sql file. Then I imported it, but I made one small change to one line of the exported file. I changed:

Code: [Select]
INSERT INTO `contacts` (`contact_id`, `changed`, `del`, `name`, `email`, `firstname`, `surname`, `vcard`, `user_id`) VALUES
To:

Code: [Select]
INSERT IGNORE INTO `contacts` (`contact_id`, `changed`, `del`, `name`, `email`, `firstname`, `surname`, `vcard`, `user_id`) VALUES
I just added that one word "IGNORE". That way, when I selected the new table and chose 'import,' mysql did not complain about duplicate entries from the exported file (which did happen without the IGNORE.)

Anyway, it seemed straightforward enough.

Ross