Addon Details

Watch - Add Favorite


smartDB ScreenShot

Does this version work for you?
1
w00ts
w00t!2

smartDB - Version 0.8.3

posted on 2012-05-13 06:51:25
by mister-man



Description

[size=150][b][color=red]smartDB[/color][/b][/size] [color=orange][b]Version: 0.8.3[/b][/color] [color=orange][b]Release date: 17.05.2012[/b][/color] [color=orange][b]Support Url: [url]http://c-o-g.de[/url][/b][/color] [b]Description:[/b] smartDB allows the use of MySQL in EventScripts Python. With smartDB you can use "normal" MySQL commands, functions (eg views) and a "keystruktur" as it is already known from EventScripts. Coders have the opportunity here, a direct support of MySQL, by using the "smartDB.mysql" and "smartDB.easyDB" classes in their script. Administrators have the opportunity to use "smartDB.easyDB" or "keycommand" replacement, without changes in the source. [b]Examples:[/b] [b]Use native MySQL with cursor[/b] [syntax="python"] from smartDB import smartDB sql = mysql(<HOST> , <PORT> , <USER> , <PASSWD> , <DATABASE>) def sql(): mysql = "SELECT * FROM table" sql.cursor.execute(str(mysql)) rows = sql.cursor.fetchall() for row in rows: pass [/syntax] [b]Use easyDB with key syntax and own db:[/b] [syntax="python"] from smartDB import smartDB db = smartDB.easyDB(<HOST> , <PORT> , <USER> , <PASSWD> , <DATABASE>) def commands(): db.grouplist() db.grouplist(<groupname>) db.groupcreate(<groupname>) db.keycreate(<groupname>,<keyname>) db.groupsave(<groupname>,<location>) db.keycreate(<groupname>,<location>) db.keysetvalue(<groupname>,<keyname>,<valuename>,<value>) db.keygetvalue(<groupname>,<keyname>,<valuename>) db.groupdelete(<keygroupname>) db.groupname(<keygroupname> , <new keygroupname>) db.keydelete(<keygroupname> ,<keyname>) [/syntax] [b]Use easyDB with key syntax and shared db:[/b] [syntax="python"] from smartDB import smartDB smartDB.edb.grouplist() smartDB.edb.grouplist(<groupname>) smartDB.edb.groupcreate(<groupname>) smartDB.edb.keycreate(<groupname>,<keyname>) smartDB.edb.groupsave(<groupname>,<location>) smartDB.edb.keycreate(<groupname>,<location>) smartDB.edb.keysetvalue(<groupname>,<keyname>,<valuename>,<value>) smartDB.edb.keygetvalue(<groupname>,<keyname>,<valuename>) smartDB.edb.groupdelete(<keygroupname>) smartDB.edb.groupname(<keygroupname> , <new keygroupname>) smartDB.edb.keydelete(<keygroupname> ,<keyname>) [/syntax] [b]Use keycommand replacement:[/b] [u][b]ATTENTION, EXPERIMENTAL MAY BREAK SOME SCRIPTS ![/b][/u] [syntax="python"] es.keycreate() es.keydelete() es.keygetvalue() es.keysetvalue() es.keygroupcreate() es.keygroupload() es.keygrouprename() es.keygroupsave() es.keylist() [/syntax] [b]Istallation:[/b] 1. Copy the folder "smartDB" in the eventscripts folder (cstrike / addons / eventscripts). 2. Launch the plugin by entering "es_load smartDB" in the server console (or RCon). 3. Now the config is generated in "cstrike / addons / eventscripts / smartDB". Set your MySQL server settings! 4. Add the startup command (es_laod smartDB) in the "autoexec.cfg" a (cstrike / cfg). 5. Start the server! [b]Thanks to:[/b] 1. GODJonez (Coding Help es.key replacement) 2. Ayuto (Further explanation es.key replacement) [b][size=150][url=http://c-o-g.de/index.php?site=files&file=26]DOWNLOAD[/url][/size][/b] [b]Version history:[/b] [b][i]0.8.3 (17.05.2012)[/i][/b] - Automatic database disconnect added [b][i]0.8.2 (11.05.2012)[/i][/b] - smartDB beta release

Version Notes For 0.8.3

Updated on: 2012-05-17 11:23:05 EST by mister-man (View Zip Contents)


( Previous Versions )