Lasso Soft Inc. > Home

[ string->encodeSQL ]

Method

[string->encodeSQL] encodes illegal characters in SQL string literals by escaping them with a backslash. Helps to prevent SQL injection attacks and ensures that SQL statements only contain valid characters. This tag can be used to encode values for MySQL data sources.

  • Syntax
'String Value'->encodeSQL
Examples
  • Beginner

To encode illegal characters in SQL string literals:

Use the [string->encodeSQL] method. The following example escapes illegal characters with a backslash.

Code

"Rhino's horn"->encodesql

Result

Rhino\'s horn

Recent Comments

No Comments found

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft