Raised This Month: $ Target: $400
 0% 

Basic SQL usage


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Djklobasa
Member
Join Date: Nov 2007
Old 04-30-2011 , 18:02   Basic SQL usage
Reply With Quote #1

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?

Last edited by Djklobasa; 04-30-2011 at 18:16.
Djklobasa is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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