13.01.2014, 17:24
Hi,
I tried to recover 2 values posX and posY from my mysql database, but it always return me "0". Could you please tell me what's wrong in my code ?
Thank you !
Mysql log:
I don't understand what's wrong :S
Thank you !
I tried to recover 2 values posX and posY from my mysql database, but it always return me "0". Could you please tell me what's wrong in my code ?
Thank you !
Код:
mysql_format(mysql, query, sizeof(query), "INSERT INTO `joueurs` (`Username`, `Password`, `IP`, `Admin`, `VIP`, `Argent`, `posX` ,`posY`, `posZ`, `Interieur`, `World`, `Skin`, `Niveau`) VALUES ('%e', '%s', '%s', 0, 0, 1000, 1527.5634, -1738.9218, 13.5469, 0, 0, 26, 1)", Name[playerid], pInfo[playerid][Password], IP[playerid]); mysql_tquery(mysql, query, "", ""); mysql_format(mysql, query, sizeof(query), "SELECT `posX`, `posY` FROM `joueurs` WHERE `posX` = '%f', `posY` = '%f'", pInfo[playerid][posX], pInfo[playerid][posY]); printf("%f %f ", pInfo[playerid][posX], pInfo[playerid][posY]);
Код:
[19:34:59] [DEBUG] mysql_format - connection: 1, len: 1024, format: "INSERT INTO `joueurs` (`Username`, `Password`, `IP`, `Admin`, `VIP`, `Argent`, `posX` ,`posY`, `posZ`, `Interieur`, `World`, `Sk..." [19:34:59] [DEBUG] mysql_tquery - connection: 1, query: "INSERT INTO `joueurs` (`Username`, `Password`, `IP`, `Admin`, `V", callback: "(null)", format: "(null)" [19:34:59] [DEBUG] mysql_format - connection: 1, len: 1024, format: "SELECT `posX`, `posY` FROM `joueurs` WHERE `posX` = '%f', `posY` = '%f'" [19:34:59] [DEBUG] CMySQLQuery::Execute[] - starting query execution [19:34:59] [DEBUG] CMySQLQuery::Execute[] - query was successful [19:34:59] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving
Thank you !