View previous topic :: View next topic |
Author |
Message |
el sombrero
Joined: 03 Apr 2012 Posts: 12
|
Posted: Mon Jul 09, 2012 23:57 Post subject: Newbie how to save data from the module to the database |
|
|
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 |
|
|
Rokene
Joined: 06 Apr 2011 Posts: 10
|
Posted: Tue Jul 10, 2012 21:28 Post subject: |
|
|
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 |
|
|
el sombrero
Joined: 03 Apr 2012 Posts: 12
|
Posted: Thu Jul 12, 2012 3:29 Post subject: |
|
|
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 |
|
|
|