vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   SQL queries when creating a new thread (https://vborg.vbsupport.ru/showthread.php?t=298450)

unnamedghost 05-25-2013 01:32 AM

SQL queries when creating a new thread
 
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.

PHP Code:

local handler mysql_connect("XXX""XXX""XXX""XXX"3306)
                  if (
handlerthen
                       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>


All times are GMT. The time now is 05:32 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01217 seconds
  • Memory Usage 1,718KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete