SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 24/12/2018, 02:34 PM   #1
SapMan
Banned
 
Join Date: Jul 2017
Posts: 140
Reputation: 12
Default SQLite question

Is it necessary to use these things ( INSERT INTO `PLAYERS` ( `NAME` ), %q )?

I mean those quotes " `` " and " %q " instead of " %s "
SapMan is offline   Reply With Quote
Old 24/12/2018, 02:45 PM   #2
SyS
High-roller
 
SyS's Avatar
 
Join Date: Oct 2015
Posts: 1,939
Reputation: 504
Default Re: SQLite question

If a column has same name as a reserved keyword in SQL or contains a space, you need to quote it using back ticks ( ` ).

%q escapes special characters in order to avoid SQL injection
SyS is offline   Reply With Quote
Old 24/12/2018, 03:14 PM   #3
SapMan
Banned
 
Join Date: Jul 2017
Posts: 140
Reputation: 12
Default Re: SQLite question

Oh, it's fine. But, I do not understand the second, what do you mean by "special characters"? If it's the name, ip, password, how would you do it in this case?
SapMan is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SQLite question Adain Scripting Help 1 15/07/2018 11:49 AM
SQLite question RyderX Scripting Help 7 19/03/2017 11:25 AM
SQLite question jbankss Scripting Help 5 04/12/2016 12:11 PM
SQLite Question iTzZh Scripting Help 2 25/11/2012 07:51 AM
SQLite Question. Glint Scripting Help 1 08/07/2012 11:57 AM


All times are GMT. The time now is 05:49 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.