mysql doesnt insert information in sql
#1

Hello guys, look i have some kinda of problem its like then i try to update some information when some server member want to put boxes in warehouses and information doesnt change. Example i have 150 ammo in my job warehouse i take some box and take it in designated place then i put box mysql should update information and add +150 ammo in sql base but nothing work . Sorry for my bad english maybe you understand what i want to say.

my code:
Код HTML:
mysql_format(connectionHandle, query, 100, "UPDATE `mafijosammo` SET GpAmmoAK = '%d',GpAmmoDeagle = '%d',GpAmmoShotgun = '%d',GpAmmoAWP = '%d;", ARASSettings[GpAmmoAK], ARASSettings[GpAmmoDeagle],  ARASSettings[GpAmmoShotgun], ARASSettings[GpAmmoAWP]);
            mysql_function_query(connectionHandle,query,false,"SendQuery","");
Reply
#2

Error in syntax.
Код:
"UPDATE `mafijosammo` SET GpAmmoAK = '%d',GpAmmoDeagle = '%d',GpAmmoShotgun = '%d',GpAmmoAWP = '%d';"
Always check mysql debug/log if something is not inserted/updated. A better way if you are going to store more weapons is a child-table. Have a look here: https://sampforum.blast.hk/showthread.php?tid=505081

Eventually upgrading to latest version of mysql is also recommended.

Last, enable cache even if it's an INSERT/UPDATE query.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)