Garry's Mod Wiki

Revision Difference

Global.SQLStr#560305

<function name="SQLStr" parent="Global" type="libraryfunc"> <description>Returns the input value in an escaped form so that it can safely be used inside of queries. The returned value is surrounded by quotes unless noQuotes is true. Alias of <page>sql.SQLStr</page></description>⤶ <description>Returns the input value in an escaped form so that it can safely be used inside of queries. The returned value is surrounded by quotes unless noQuotes is true. Alias of <page>sql.SQLStr</page>⤶ ⤶ <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> <args> <arg name="input" type="string">String to be escaped</arg> <arg name="noQuotes" type="boolean" default="false">Whether the returned value should be surrounded in quotes or not</arg> </args> <rets> <ret name="" type="string">Escaped input</ret> </rets> </function>