Garry's Mod Wiki

Revision Difference

sql.SQLStr#528744

<function name="SQLStr" parent="sql" type="libraryfunc"> <description> Escapes dangerous characters and symbols from user input used in an SQLite SQL Query. <note>this function is not meant to be used with external database engines such as `MySQL`. Escaping strings with inadequate functions is dangerous!</note> </description> <realm>Shared and Menu</realm> <file line="6-L27">lua/includes/util/sql.lua</file>⤶ <args> <arg name="string" type="string">The string to be escaped.</arg> <arg name="bNoQuotes" type="boolean" default="false">Set this as true, and the function will not wrap the input string in apostrophes.</arg> <arg name="bNoQuotes" type="boolean" default="false">Set this as `true`, and the function will not wrap the input string in apostrophes.</arg> </args> <rets> <ret name="" type="string">The escaped input.</ret> </rets> </function>