Garry's Mod Wiki

SQLStr

  string SQLStr( string input, boolean noQuotes = false )

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 sql.SQLStr

This function is not meant to be used with external database engines such as MySQL. Escaping strings with inadequate functions is dangerous!

Arguments

1 string input
String to be escaped
2 boolean noQuotes = false
Whether the returned value should be surrounded in quotes or not

Returns

1 string
Escaped input