Home » Renegade Discussions » Mod Forum » MySQL with SSGM?
Re: MySQL with SSGM? [message #432952 is a reply to message #432950] |
Sat, 17 July 2010 11:26 |
|
TechnoBulldog
Messages: 15 Registered: May 2010 Location: Texas
Karma:
|
Recruit |
|
|
reborn wrote on Sat, 17 July 2010 13:08 | I'm glad you've got it working, welldone!
Can I ask what it is you plan to do with this? What are you working on? Anything for rene that needs DB support sounds pretty interesting. What are your plans?
/* google this, para phrasing, but from daniweb:
mysql_real_escape_string is actually from the MySQL C API, rather than the developers of PHP. The PHP developers created addslashes().
char * S = new char[strlen(m_headerSubject.c_str())*3 +1];
mysql_real_escape_string(conn, S, m_headerSubject.c_str(), m_headerSubject.length());
m_headerSubject = m_headerSubject.assign(S);
*/
|
I did read something like that, but I can't find the function. I'm guessing it's in a file I haven't included.
Originally, I had the idea to use a database because a friend of mine, Sonic (Sonic2876) said he was planning on opening up a few servers, his main focus being a build server. He said he was having issues making "!load" and "!save" in Lua, and I thought that I might be able to do it in c++. However, I've never gone very deep in c++ (my learning level is somewhere around intermediate) and I never got into fstream or any of those functions. I have recently been experimenting with MySQL and php, though, and the first thing I thought of was storing the objects in a database. I figured it would be cleaner and more efficient.
However, I am nowhere near ready to make a build server, so I decided to experiment around first. The idea for this plugin came from Cloud, my main server and one I moderate on. DarkOrbit has a lua script for "!postnote" that I think writes to a file, but I'm not entirely sure. I thought that if you wrote it to a database, a simple php script could let you view all of the notes from in game players and clear it relatively easily. If you write it to a file, you have to manually connect the server and find the file, which sounds like a hassle. At the moment, I just need to find a way to prevent injection attacks (which work easier than I expected) and write the php page. Otherwise, I think this simple but useful plugin will be done.
Cloud-Zone Gaming. Check it out.
^^ Awesome right?
|
|
|
Goto Forum:
Current Time: Sun Nov 24 17:22:25 MST 2024
Total time taken to generate the page: 0.01419 seconds
|