vendredi 28 mars 2014

[MYSQL] Ligne inutile ?

Salut à tous,



J'ai fais ce code il y a un mois environ et j'ai l'impression en le revoyant qu'une ligne y est inutile. Je voudrais savoir si c'est bien le cas ou si elle sert à quelque chose.



Le code:




Code:



mysql_format(mysql, query, sizeof(query),"SELECT * FROM `joueurs` WHERE `Username` = '%e' LIMIT 1", Name[playerid]);

mysql_format(mysql, query, sizeof(query), "UPDATE `joueurs` SET `DerniereIP`='%s', `Admin`=%d, `VIP`=%d, `Argent`=%d, `Banque`=%d, `posX`=%f, `posY`=%f, `posZ`=%f, `Interieur`=%i, `World`=%i, `Skin`=%d, `Niveau`=%d WHERE `ID`=%d",

IP[playerid], pInfo[playerid][Admin], pInfo[playerid][VIP], pInfo[playerid][Argent], pInfo[playerid][Banque], pos[0], pos[1], pos[2], GetPlayerInterior(playerid), GetPlayerVirtualWorld(playerid), pInfo[playerid][Skin], pInfo[playerid][Niveau], pInfo[playerid][ID]);

mysql_tquery(mysql, query, "", "");

mysql_format(mysql, query, sizeof(query), "UPDATE `joueurs` SET `Vie`=%f, `Armure`=%f, `MinutesJouees`=%d, `HeuresJouees`=%d, `JoursJoues`=%d,`Prison`=%d, `TempsPrison`=%d, `Tues`=%d, `Morts`=%d WHERE `ID`=%d",

vie[0], armure[0], pInfo[playerid][MinutesJouees], pInfo[playerid][HeuresJouees], pInfo[playerid][JoursJoues], pInfo[playerid][Prison], pInfo[playerid][TempsPrison], pInfo[playerid][Tues], pInfo[playerid][Morts], pInfo[playerid][ID]);

mysql_tquery(mysql, query, "", "");

mysql_format(mysql, query, sizeof(query), "UPDATE `joueurs` SET `Arme1`=%d, `Munition1`=%d, `Arme2`=%d, `Munition2`=%d, `Arme3`=%d, `Munition3`=%d, `Arme4`=%d, `Munition4`=%d, `ClefMaison`=%d, `DansMaison`=%d WHERE `ID`=%d",

pInfo[playerid][Arme1], pInfo[playerid][Munition1], pInfo[playerid][Arme2], pInfo[playerid][Munition2], pInfo[playerid][Arme3], pInfo[playerid][Munition3], pInfo[playerid][Arme4], pInfo[playerid][Munition4], pInfo[playerid][ClefMaison],

pInfo[playerid][DansMaison], pInfo[playerid][ID]);

mysql_tquery(mysql, query, "", "");



La ligne en question:




Code:



mysql_format(mysql, query, sizeof(query),"SELECT * FROM `joueurs` WHERE `Username` = '%e' LIMIT 1", Name[playerid]);






Aucun commentaire:

Enregistrer un commentaire