MySQL Question
#1

Hey, I was wondering why
PHP код:
    new dbquery[128];
    
mysql_tquery(Database"SELECT * FROM `players`");
    
mysql_format(Databasedbquerysizeof 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(DatabaseDB_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?
Reply
#2

pawn Код:
WHERE 1 WHERE `ID` = '%d
Cosa c'entra WHERE 1?
Reply
#3

Errore nel copy/paste, edito
Reply
#4

Posta il mysql log. Lo trovi nella cartella /logs/plugins.

Comunque

pawn Код:
WHERE `ID` = '%d'
Deve essere:

pawn Код:
WHERE `ID` = %d
Senza ' '
Reply
#5

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
Reply
#6

What's the first query needed for? And as Amir said, mysql log is your best friend.
Reply
#7

Show the whole code if mysl log doesn't have any debug.
Reply
#8

Thanks guys it was a simple lack of attention I had.
Anyways, + repped, thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)