Worries with UPDATE MySQL. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Worries with UPDATE MySQL. (
/showthread.php?tid=473004)
Worries with UPDATE MySQL. -
BrendaSAMP - 31.10.2013
Hi to all.
Well, so I have a (big) problems with my gamemode.
Don, I'll directos in the heart of the matter:
When I buy a vehicle, it correctly records the name of the buyer in my table, then when it gets into the car I run a callback or it said UPDATE-table, it keeps the name, but then the UPDATE second it puts "Aucun."
See my log (I cut if too long):
PHP код:
[23:19:36]CMySQLHandler::Query(UPDATE vehicules SET `Proprio`='Idriss_Collins' WHERE id=0) - Successfully executed.
[23:19:36] CMySQLHandler::EscapeString(Idriss_Collins); - Escaped 14 characters to Idriss_Collins.
Then it works UPDATE second and third (It's like that, the second works but not the third):
PHP код:
[23:19:38] CMySQLHandler::EscapeString(Aucun); - Escaped 5 characters to Aucun.
[23:19:38] >> mysql_query( Connection handle: 1 )
[23:19:38] CMySQLHandler::Query(UPDATE vehicules SET `Proprio`='Aucun' WHERE id=1)
Here is my code in my callback update:
PHP код:
new Requete, Proprioveh[MAX_PLAYER_NAME*4];
mysql_real_escape_string(Vehicule_infos[id][v_Proprio], Proprioveh);
format(Requete, sizeof(Requete), "UPDATE vehicules SET `Proprio`='%s' WHERE id=%d",
Proprioveh,
id);
However, in my callback add vehicle I have this line and "No" must come from there but ...
PHP код:
memcpy(Vehicule_infos[newId][v_Proprio], "Aucun", 0, MAX_PLAYER_NAME*4, MAX_PLAYER_NAME*4);