15.01.2014, 17:57
Hi all,
Do you know if it's possible to save something in sql then load it immediatly ?
Cause I'm trying to do this:
But I always have 0.00000 0.0000 0.00000.
I tried this too:
I still have 0.000000
But I don't know how can I recover posX when it have been selected from the database.
Thank you ! (:
Do you know if it's possible to save something in sql then load it immediatly ?
Cause I'm trying to do this:
Код:
new rows, fields; cache_get_data(rows, fields, mysql); pInfo[playerid][posX] = cache_get_row_float(0, 7); pInfo[playerid][posY] = cache_get_row_float(0, 8); pInfo[playerid][posZ] = cache_get_row_float(0, 9); printf("%f %f %f",pInfo[playerid][posX], pInfo[playerid][posY], pInfo[playerid][posZ]);
I tried this too:
Код:
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 FROM joueurs WHERE `Username` = '%s' ", Name[playerid]); mysql_tquery(mysql, query, "", ""); printf("%f",pInfo[playerid][posX]);
But I don't know how can I recover posX when it have been selected from the database.
Thank you ! (: