SA-MP Forums Archive
SQL 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: SQL Question. (/showthread.php?tid=317206)



SOLVED: SQL Question. - Konstantinos - 10.02.2012

Hi, I am learning SQLite and maybe soon MySQL (after the final exams on school).
I would like to ask a question about the UPDATE Statement.
Which from both is the correct because the compiler doesn't respond when I am trying to compile it.
Or something on this is wrong `Field` or something at my code because it's very big.
PHP Code:
new
    
Query200 ],
    
nameMAX_PLAYER_NAME ];
GetPlayerNameplayeridnamesizeofname ) );
formatQuerysizeofQuery ), "UPDATE `Users` SET `Score` = '%d' WHERE `Username` = '%s' COLLATE NOCASE"GetPlayerScoreplayerid ), DB_Escapename ) );
db_queryDatabaseQuery ); 
OR
PHP Code:
new
    
Query200 ],
    
nameMAX_PLAYER_NAME ];
GetPlayerNameplayeridnamesizeofname ) );
formatQuerysizeofQuery ), "UPDATE `Users` SET Score = '%d' WHERE `Username` = '%s' COLLATE NOCASE"GetPlayerScoreplayerid ), DB_Escapename ) );
db_queryDatabaseQuery ); 
The first is `Score` and the second is Score

Regards,

Edit: Solved, thanks to all!


Re: SQL Question. - T0pAz - 10.02.2012

` is used to differentiate between SQL Commands and data.


Re: SQL Question. - Konstantinos - 10.02.2012

Edit: SOLVED


Re: SQL Question. - Max_Coldheart - 10.02.2012

it should be with ` & `


Re: SQL Question. - Konstantinos - 10.02.2012

Edit: SOLVED