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 
 
Newbie how to save data from the module to the database

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Database related
View previous topic :: View next topic  
Author Message
el sombrero



Joined: 03 Apr 2012
Posts: 12

PostPosted: Mon Jul 09, 2012 23:57    Post subject: Newbie how to save data from the module to the database Reply with quote

Hey guys,

I've mysql up and running, can initiate the server etc.
The thing is, I dont know how to save data from the module to the database. For exemple, in my module I have a trigger at the floor that stores if the player has choosen to go that way instead of other possibilities. How do I take the data from the variable associated with that trigger and put it at the database?
Do I have to insert any command line at the triggers script? What should I do?
Back to top
View user's profile Send private message
Rokene



Joined: 06 Apr 2011
Posts: 10

PostPosted: Tue Jul 10, 2012 21:28    Post subject: Reply with quote

Hello there,

There is supposed to be some erfs you import into your module and these are it:

nwnx_include.erf: Include file with generic NWNX functions
nwnx_sql.erf: Include file for working with SQL databases
nwnx_time.erf: Include file with functions for timing stuff

nwnx_sql will give you an include file to include into your scripts so that you can call functions that play with mysql. If you've run the demo you should know that the DB connection is working. If not I recommend you do that first then once it's good to go you can start scripting with those functions to retrieve that variable from the db and vice versa.
Back to top
View user's profile Send private message
el sombrero



Joined: 03 Apr 2012
Posts: 12

PostPosted: Thu Jul 12, 2012 3:29    Post subject: Reply with quote

Hey, thx... now things are working... only problem is I dont know mysql quite well anyone could point to a good basic mysql commands faq?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Database related 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