Escape sql

From Hercules Wiki
Revision as of 10:23, 24 June 2013 by Neqste (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

Syntax

  • escape_sql(<value>);

Description

Converts the value to a string and escapes special characters so that it's safe to use in query_sql(). Returns the escaped form of the given value.

Examples

set .@str$, "John's Laptop"; set .@esc_str$, escape_sql(.@name$); // Escaped string: John\'s Laptop

See Also