MySQL Question - 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: MySQL Question (
/showthread.php?tid=658831)
MySQL Question -
v1k1nG - 13.09.2018
Hey, I was wondering why
PHP код:
new dbquery[128];
mysql_tquery(Database, "SELECT * FROM `players`");
mysql_format(Database, dbquery, sizeof dbquery, "UPDATE `players` SET `KILLS`='%d',`DEATHS`='%d',`ADMIN`='%d',`IP`='%s' WHERE `ID` = '%d' LIMIT 1", P[id][Kills], P[id][Deaths], P[id][Admin], P[id][IP], P[id][ID]);
mysql_tquery(Database, DB_Query, "OnPlayerStatsSaved", "d", id);
if(cache_is_valid(P[id][playercache])){
cache_delete(P[id][playercache]);
P[id][playercache] = MYSQL_INVALID_CACHE;
}
printf("%s", dbquery);
Is not saving infos?
Re: MySQL Question -
KinderClans - 13.09.2018
Cosa c'entra WHERE 1?
Re: MySQL Question -
v1k1nG - 13.09.2018
Errore nel copy/paste, edito
Re: MySQL Question -
KinderClans - 13.09.2018
Posta il mysql log. Lo trovi nella cartella /logs/plugins.
Comunque
Deve essere:
Senza
' '
Re: MySQL Question -
AmirSavand - 13.09.2018
Just some tips, you don't need to wrap int values with anything, always check logs and debug before posting also print your entire SQL then execute it in PhpMyAdmin to see some visuals with error reporting
Re: MySQL Question -
iLearner - 13.09.2018
What's the first query needed for? And as Amir said, mysql log is your best friend.
Re: MySQL Question -
UFF - 14.09.2018
Show the whole code if mysl log doesn't have any debug.
Re: MySQL Question -
v1k1nG - 14.09.2018
Thanks guys it was a simple lack of attention I had.
Anyways, + repped, thanks!