PDA

View Full Version : SQL queries when creating a new thread


unnamedghost
05-25-2013, 01:32 AM
Hello.

I currently run a game server which uses Lua in conjunction with a MySQL database to store information. I'm attempting to make it so after an in game command is executed, it will launch an SQL query which will create a new thread inside a specific forum section on the vBulletin forums.

This is what I have so far, it basically connects the game to the vB database.

local handler = mysql_connect("XXX", "XXX", "XXX", "XXX", 3306)
if (handler) then
mysql_query(handler, "query 1 goes here")
mysql_query(handler, "another query goes here and so forth")
end

As stated earlier, I'm trying to make an automatic thread into a section using MySQL queries. I need all of the queries required when making a new thread to make sure it works properly, such as inserting the thread into the section, updating the amount of threads made, update user post count etc..

If I need to clarify anything, let me know. It might be a bit of a jumble.

Thanks in advance.

Zachery
05-25-2013, 08:07 AM
Why don't you just use the dm's built into vBulletin, and build an application to take the data?

Would be way better to use the built in tools that won't change nearly as much overtime then custom queries, which you'll have to do a lot of your own cleaning and validation on to prevent exploits.

unnamedghost
05-25-2013, 02:01 PM
Do you know how I could go about doing that?

Would this https://wiki.multitheftauto.com/wiki/CallRemote be of much use?

Zachery
05-25-2013, 02:44 PM
<a href="https://vborg.vbsupport.ru/showthread.php?t=229654&highlight=data+manger" target="_blank">https://vborg.vbsupport.ru/showt...ht=data+manger</a>