G.SQLStr
From GMod Wiki
| Function | |
| Syntax |
SQLStr( String value ) Where is this used? |
| Description: | |
| Returns a string value that is safe to insert into an SQL statement | |
| Returns: | String |
| Part of Library: | Global Functions |
| Realm: |
|
| BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=G.SQLStr]G.SQLStr [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Example
Additional Notes
- Escapes double quotes and surrounds the value in double quotes.
- This should be used ANYWHERE that a string is inserted into an SQL statement. Otherwise, at best, you query will fail and, at worst, someone can modify or corrupt your data.
- Not using this could result in SQL Injection.