Possible to import members:

Hi- I have a business network here that has become dysfunctional and would like to get my members out of there and into a Dolphin site as soon as I possibly can.  I've heard it said here that it is not really possible to import member records via phpmyadmin, but could someone verify this?  I've got about 400 records in there and was hoping I could just import them into the profile tables, but someone said that too much happens when you click the "submit" button - i.e. a bunch of other stuff gets updated.  Is that true?  I don't relish the though of entering 400 records by hand, but will do it if there is no other way.

Rob

Quote · 24 Aug 2008

caltrade,

have you taken a look at that utility i posted some time ago mysql administrator? if you want me to go backup the members table, and help you get it imported just let me know. i know a little about how this should be done and how not to do it.

holla at the dawg

later,
DosDawg

When a GIG is not enough --> Terabyte Dolphin Technical Support - Server Management and Support
Quote · 24 Aug 2008

That would be INCREDIBLY COOL! will contact you off line.  I was thinking about that utility you mentioned but lost the link - could you repost it or send it to me.

Rob

Quote · 24 Aug 2008

BACKUP your database before altering.

caltrade, examine the profile table to see if the fields match  .....  they have to match exactly of it will screw it up.

If they match, you're good to go.

If they don't, manipulate them until they do.
.

Quote · 24 Aug 2008

I've never done this before and have some questions:

1.  I understand all the fields need to match, but can the source data be missing a field that exists in the dolphin profile table I want to populate.  For example, if I have a field called "profession" in my dolphin profile database, but my source data does not have it, do I need to add a blank column for it, and for all the fields for data I don't have?

2. Do the fields in the source data need to be in the exact same order in the source file?  I understand they need the exact same name, but do they need to be in the same order?

3. I'm planning to bring this in with nothing in the password field, and a status of "inactive". Will that cause any problems?  I have the users original passwords and was going to add them one by one as I activate it.

I have the data in MS Excel - is any particular format better to use than others?

Thanks

Rob

Quote · 28 Aug 2008

ALWAYS BACKUP your database(s) before altering.

To successfully import your new data you HAVE to make it match the new format.

The best way is to export the table(s) in question (new) as cvs from dolphin and open it side by side with your old table. (old)

You are ultimately making the old columns (fields) conform to the new columns so they match when you import them.

Start at the left and work to your right.

Manipulate the old columns to match the new.

Rename any old columns if necessary.

If there are any columns in the old you do not want in the new table, delete them.

If you have a column in old that doesn't exist in new then go to phpMyAdmin > newdb > table and create a new field (column) for it with the same name as the old.

If you have a column in the new that does not exist in the old, add a blank column to the old with the same name. If you want a default value for it, populate the value.

When you are finished you should have left to right the SAME columns in the old as in the new.

You really have a lot of flexibility with it but in the end the OLD have to match the new EXACTLY column for column.

Export from excel as cvs  .....  import into mysql  .....  done
.



Quote · 28 Aug 2008

Thanks Rumpy - I am going through and adding and moving all of those fields- though someone else said I wouldn't have to do that if they are named properly.  Do you know about the password field- can that be imported empty?  What about all those date fields- can they be empty?

Rob

Quote · 28 Aug 2008

Yes they will just create empty fields in the new data  ..... 
.

Quote · 28 Aug 2008

OK, after a bit of a struggle, I got my data in.  I purposely imported all the records in with a status of "inactive" and as a test, just set one of them to "active".  I can do a search for this member and his record will show up fine, but when I list "all members" his record will not be there.  Can anyone guess as to why this might be?

Rob

Quote · 29 Aug 2008

Does anyone have any thoughts on this?  Before I did this I was worried that something might happen when you enter a record by the join form (other tables updated, etc) that doesn't happen when you import records directly into the profiles table.  Everything seems fine in the members area of the control panel, and you can find an activated member when you do a search, but they don't show up on the "all members" search.   My only thought is that a blank DateReg field might be causing some problems.  I looked in the Dolphin profile table and found that this had data in this form "39665.55774" - so I copied that to all fields, but it didn't seem to take.  Not sure if that is the problem though.  Can anyone think of what might be wrong?

Rob

Quote · 29 Aug 2008

No kidding!  What if you just never put it in your join form (as I haven't)?  Is there a default you can put in there that won't hurt anything?

Quote · 29 Aug 2008

Well I'll be damned.  I just added that to the admin edit, added a fake birthdate, and that was it!  Thanks Sammie!

How do people with business sites handle this?  On some business sites this is not appropriate, and on others- such as employment sites in certain countries might even be illegal.  What is usually done about this?

Rob

Quote · 29 Aug 2008

Not sure, but when a new member join, it will make a member info file in cache folder...

Maybe you dont have they!!! Not sure when they are used browse, search, profile view etc.!!!!

(browse us profiles.inc.php => function getProfileInfo get member info from cache-file...)

 

 

<?

$aUser[1] = array();
$aUser[1]['datafile'] = true;
$aUser[1]['ID'] = '1';
$aUser[1]['NickName'] = 'user_1';

+++ More

 

And about the Date format:

DateReg 2008-08-02 09:42:03

DateLastEdit 0000-00-00 00:00:00

DateLastLogin 2008-08-02 09:45:15

 

DateOfBirth 1969-07-16

 

 

Maybe it can help you!!!

okweb

Quote · 29 Aug 2008

Thanks for your help okweb and Sammie.  Weird though - I thought I could put a default birthdate in the profiles table in phpmyadmin, but it didn't show up in the admin section- maybe it should be in the profile fields table?  Doesn't really matter, not that I know the issue I can come up with a workaround, and I am delighted that I got my data in.

Rob

Quote · 29 Aug 2008


go to phpMyAdmin > profiles > structure > dateobirth > default and change the 0000-00-00 to the default you want to use  ..... 

Populate the dateobirth column with your 'fake' for your members without one  ..... 
.

Quote · 29 Aug 2008
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.