Hi all,
I want to make a banlist using mysql
the table name is ban_guid_sdCode:guidbanplayer(admin, reason, id, guid) { maps\mp\gametypes\_mysql::asyncQuery("INSERT INTO ban_guid_sd (guid, name, reason, admin) VALUES (" + guid + ", " + maps\mp\gametypes\_mysql::stripString(self.name) + "," + maps\mp\gametypes\_mysql::stripString(reason) + "," + maps\mp\gametypes\_mysql::stripString(admin.pers["loginname"]) + ")"); printf("GUID ban added to database2!\n"); printf("guid "+guid+ "\n"); printf("name "+maps\mp\gametypes\_mysql::stripString(self.name)+ "\n"); printf("reason "+maps\mp\gametypes\_mysql::stripString(reason)+ "\n"); printf("admin "+maps\mp\gametypes\_mysql::stripString(admin.pers["loginname"])+ "\n"); }
the printf are shown correct
However, the record is not added to the table.
Im connected to the database
I see the message "Connected to database"Code:initMySQL(host, user, pass, db, port) { mysql = mysql_init(); ret = mysql_real_connect(mysql, host, user, pass, db, port); if(!ret) { printf("errno=" + mysql_errno(mysql) + " error= " + mysql_error(mysql) + "\n"); mysql_close(mysql); return undefined; } else printf("Connected to database!\n"); return mysql; }
What is wrong?

Reply With Quote

