transfer multiple members to database
« on: December 26, 2014, 02:28:23 AM »
Does anyone have any instructions/code on how I can do the following?

I have around 500 old members I would like to transfer to a new dating website I set up with osdate. The osdate is up and running. I can add the members via sql no problem. However I need help adding the member photos. Here is the deal...

Photos are in a folder. Each photo filename is the userid which matches the userid the users table.
Example userid 5001 in the table has 4 photos filenames 5001-1.jpg, 5001-2.jpg, 5001-3.jpg, 5001-4.jpg

I need a php(or sql? )script that will upload these .jpg files to the table that stores user photos with the matching userid.

ps: I am storing pics in a folder instead of storing in the actual database.

Thank you all!
« Last Edit: December 26, 2014, 02:42:21 AM by mrswitchonline »

*

Pharg

  • *****
  • 2,060
  • osDate Version: osDate Evo v1.0
Re: transfer multiple members to database
« Reply #1 on: December 26, 2014, 03:33:51 AM »
Does anyone have any instructions/code on how I can do the following?

I have around 500 old members I would like to transfer to a new dating website I set up with osdate. The osdate is up and running. I can add the members via sql no problem. However I need help adding the member photos. Here is the deal...

Photos are in a folder. Each photo filename is the userid which matches the userid the users table.
Example userid 5001 in the table has 4 photos filenames 5001-1.jpg, 5001-2.jpg, 5001-3.jpg, 5001-4.jpg

I need a php(or sql? )script that will upload these .jpg files to the table that stores user photos with the matching userid.

ps: I am storing pics in a folder instead of storing in the actual database.

Thank you all!

Hi mrswitchonline,

From what other dating system are they on and have you tried the admin import options yet?
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDate v2.7 & osDateEvo v1.0 | PHP: 5.3.42 & PHP: 5.6.18 | MySQL: 5.5.35

Re: transfer multiple members to database
« Reply #2 on: December 26, 2014, 03:15:21 PM »
From what other dating system are they on and have you tried the admin import options yet?

They are actually coming from a previous wordpress based blog. They have already been downloaded into a dump from the blog though. I saw the import options but dint really try them, I assumed they were specific to only the dating softwares listed. Also I found some php code on stack overflow that looks like it may work. Looks like a simple process I'm just not as tech savvy. I will give the imports a try first and see if I can use their php code.

*

CBG

  • *****
  • 673
    • osDate Forum
Re: transfer multiple members to database
« Reply #3 on: December 26, 2014, 04:03:45 PM »
If you post up the code. maybe a member can check it.
Regards,
CBG (Garry)
osDate: 2.6.5, 2.7 & Evo
PHP: 5.5.x/5.6.x (5.3.x to 5.6.x) | MySQL: 5.5.34-cll

Re: transfer multiple members to database
« Reply #4 on: January 01, 2015, 10:18:25 PM »
This actually turned out to be pretty simple. I was way over thinking things. ::)

use the good ol' DOS command line to save a list of all the files in the current directory to a txt file:

dir > filelist.txt ( if you have picture subfolders use: dir /s > filelist.txt )

Then just log into your mySQL database panel and import the filenames saved in filelist.txt to a temp table in your database. After which you can use sql to add them to the actual user table.
« Last Edit: January 02, 2015, 03:52:52 AM by mrswitchonline »