MySQL does not update me
#4

Quote:
Originally Posted by BreakStore
View Post
Hello try this,

PHP Code:
new DB_Query[256]; 
mysql_format(DatabaseDB_Querysizeof(DB_Query), "UPDATE `USUARIOS` SET `NIVEL` = %d, `DINERO` = %d, `ASESINATOS` = %d, `MUERTES` = %d WHERE `ID` = %d LIMIT 1"
InfoU[playerid][pNivel], InfoU[playerid][pDinero], InfoU[playerid][pAsesinatos], InfoU[playerid][pMuertes], InfoU[playerid][ID]);
mysql_tquery(DatabaseDB_Query); 
EDIT: You don't forget the function mysql_tquery to save the data of player ?
Hello thanks for replying, if I have mysql_tquery I forgot to post it here, I tried it as you did the code and keep going with the same review the table and has it in 0, but when printing the value I print it in 1, I have it trying in several ways and not being updated.


PHP Code:
    mysql_format(DatabaseDB_Querysizeof(DB_Query), "UPDATE `USUARIOS` SET `NIVEL` = %d, `DINERO` = %d, `ASESINATOS` = %d, `MUERTES` = %d WHERE `ID` = %d LIMIT 1",
    
InfoU[playerid][pNivel], InfoU[playerid][pDinero], InfoU[playerid][pAsesinatos], InfoU[playerid][pMuertes], InfoU[playerid][ID]);
    
mysql_tquery(DatabaseDB_Query);
    
printf("%d"InfoU[playerid][pNivel]); 
I give you the create table.

PHP Code:
mysql_tquery(Database"CREATE TABLE IF NOT EXISTS `USUARIOS` (`ID` int(11) NOT NULL AUTO_INCREMENT,`NOMBRE` varchar(24) NOT NULL,`CLAVE` char(65) NOT NULL,`SALT` char(11) NOT NULL,`NIVEL` mediumint(7), `ASESINATOS` mediumint(7), `DINERO` mediumint(7) NOT NULL DEFAULT '0',`MUERTES` mediumint(7) NOT NULL DEFAULT '0', PRIMARY KEY (`ID`), UNIQUE KEY `NOMBRE` (`NOMBRE`))"); 
The table if it is created, until the account of the player but what happens is that when disconnecting is not updated

I have tried since yesterday but I do not update anything.
Reply


Messages In This Thread
MySQL does not update me - by Swankeh - 23.09.2017, 15:52
Re: MySQL does not update me - by BreakStore - 23.09.2017, 16:41
Re: MySQL does not update me - by whadez - 23.09.2017, 16:47
Re: MySQL does not update me - by Swankeh - 23.09.2017, 16:56
Re: MySQL does not update me - by whadez - 23.09.2017, 17:04
Re: MySQL does not update me - by Swankeh - 23.09.2017, 17:16
Re: MySQL does not update me - by Swankeh - 23.09.2017, 17:26
Re: MySQL does not update me - by whadez - 23.09.2017, 17:27

Forum Jump:


Users browsing this thread: 2 Guest(s)