PDA

View Full Version : [Extension] MySQL



kung foo man
14th May 2013, 12:50
Hey all,

the most important MySQL-functions from the C-API are binded to CoDScript.



mysql_init()
mysql_real_connect(mysql, host, user, pass, db, port)
mysql_close(mysql)
mysql_query(mysql, query)
mysql_errno(mysql)
mysql_error(mysql)
mysql_affected_rows(mysql)
mysql_store_result(mysql)
mysql_num_rows(result)
mysql_num_fields(result)
mysql_field_seek(result, position)
mysql_fetch_field()
mysql_fetch_row(result)
mysql_free_result(result)


A full example with money and ranks: http://killtube.org/downloads/cod2/exampleserver/main/std/persistence.gsc

Have fun scripting :)

IzNoGoD
14th May 2013, 16:38
I'm currently porting the _stattracking.gsc file to support this mysql plugin. Expect something soon :)