AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Basic SQL usage (https://forums.alliedmods.net/showthread.php?t=156086)

Djklobasa 04-30-2011 18:02

Basic SQL usage
 
hello, i am trying to connect to my MySQL Database and do some query when someone write something but it doesn't work. the plugin works without errors, it just doesn't do the query. can you take a look on my script, please?

Code:

#include <amxmodx>
#include <amxmisc>
#include <dbi>


public plugin_init() {
    register_plugin("sqltest", "1.0", "kOoO")
    register_clcmd("say", "sendSay", 0, "hovno")
}

public sendSay(){
    new Sql:name
    Sql:name = dbi_connect ( "localhost", "root", "", "pawntest")
    dbi_query(name, "UPDATE table1 SET column1 = 1")
}

btw, i read somewhere that "dbi" is old version of sql. if so, where can i find some actual tutorial?

Sylwester 04-30-2011 18:27

Re: Basic SQL usage
 
check this: https://forums.alliedmods.net/showth...66#post1204466

RelaxMazteR 05-02-2011 07:40

Re: Basic SQL usage
 
https://forums.alliedmods.net/showthread.php?t=132686


All times are GMT -4. The time now is 04:30.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.