Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Data Importing

Asked Modified Viewed 1,182 times
D
daimonbok1
D
Into The Nebula! Is it Science or Science Fiction?
  • Senior Member, joined since
  • Contributed 626 posts on the community forums.
  • Started 141 threads in the forums
  • Started this discussions
asked
Senior Member

Just a thought....Some of us have large link lists, it's a major pain adding them one at a time....If there was a way to import this type of data into Fusion's database it would be nice.
0 replies

2 posts

C
Chan
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,842 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
answered
Super Admin

Please grasp some very little SQL knowledge. This is the best way you can do it with custom data.


$result = dbquery("SELECT <your columns> FROM  <your old table>");
if (dbrows($result)) :
while ($data = dbarray($result) :
 
$new_insert_data = array(
'<new data column name>' => $data[<your old column name>],
'<new data column name>' => $data[<your old column name>],
'<new data column name>' => $data[<your old column name>],
'<new data column name>' => $data[<your old column name>],
'<new data column name>' => $data[<your old column name>],
'<new data column name>' => $data[<your old column name>],
'<new data column name>' => $data[<your old column name>],
'<new data column name>' => $data[<your old column name>],
'<new data column name>' => $data[<your old column name>],
);

print_p($new_insert_data);
//dbquery_insert(<your new table>, $new_insert_data, 'save');

endwhile;
endif;


Once you're satisfied with the print dump, comment the print, and uncomment the dbquery_insert. Refresh and it will insert all 100k data you have.
0 replies
D
daimonbok1
D
Into The Nebula! Is it Science or Science Fiction?
  • Senior Member, joined since
  • Contributed 626 posts on the community forums.
  • Started 141 threads in the forums
  • Started this discussions
answered
Senior Member

Thanks Chan, I'll set up a new instance of fusion and give it a shot...Practice will make perfect.
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 2 posts
  • Votes 0 votes
  • Topic users 2 members

2 participants

C
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,842 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
D
D
Into The Nebula! Is it Science or Science Fiction?
  • Senior Member, joined since
  • Contributed 626 posts on the community forums.
  • Started 141 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet