logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Exporting Blob data into files

 
Post new topic   Reply to topic    nwnx.org Forum Index -> General Discussion
View previous topic :: View next topic  
Author Message
Kosmous



Joined: 10 Jan 2005
Posts: 44

PostPosted: Sun Apr 10, 2005 18:46    Post subject: Exporting Blob data into files Reply with quote

Is there a easy way (without using anything except nwnx and mysql) to export blob data into a file? I was thinking of storing the character data into the db and exporting it as a .bic as a backup and to perhaps move it around multiple servervaults.

Im certain the .bic file thats exported from mysql is completely legal and can be used by players if placed in the proper directory (tried already). But what i used was mysqlcc's save function. Is there a command in SQL to export the blob file in the same way? Im suprised if there isnt since u can use LOAD INFILE to do the exact opposite.
Back to top
View user's profile Send private message
orth



Joined: 10 Apr 2005
Posts: 12

PostPosted: Mon Apr 11, 2005 2:26    Post subject: Reply with quote

I'm thinking you would want the "INTO DUMPFILE" option.

SELECT bic_blob_column INTO DUMPFILE '/path/to/where/you/want/it/saved'
FROM table

Might want to google for more on MySQL INTO DUMPFILE, I didn't test this, but it seems to be the appropriate function.
Back to top
View user's profile Send private message
Blacksting



Joined: 03 Jan 2005
Posts: 107

PostPosted: Mon Apr 11, 2005 4:06    Post subject: Reply with quote

Orth is correct. The only downside is that INTO DUMPFILE has no recourse to overwrite files only create them. You will have to find a non mysql method to delete a file if you plan on overwriting one already in existence.
Back to top
View user's profile Send private message
Kosmous



Joined: 10 Jan 2005
Posts: 44

PostPosted: Mon Apr 11, 2005 6:53    Post subject: Reply with quote

thanks a bunch, i think someone here already made a plugin that would move/delete bic files from player folders. If i combine the two, i can easily manage the player characters better Smile Thanks again.
Back to top
View user's profile Send private message
teleri



Joined: 28 Jan 2005
Posts: 21

PostPosted: Tue Apr 12, 2005 0:56    Post subject: Reply with quote

Would be intereted in your solution when its done (: sounds promising.
Back to top
View user's profile Send private message
Kosmous



Joined: 10 Jan 2005
Posts: 44

PostPosted: Wed Apr 13, 2005 5:17    Post subject: Reply with quote

you'll need this:

Character Delete Plugin
http://www.nwnx.org/phpBB2/viewtopic.php?t=79

And by using the select statement above you can export the bic into the proper directory.

Since we have SCORCO, adding the character bic into the database is pretty straightforward.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> General Discussion All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group