def encode_blob(data): """ Returns a properly formatted Binary Large Object value. @param data Data to encode. @return Encoded data. """ return "'" + DrupyMySQL.mysqli_real_escape_string(\ lib_appglobals.active_db, data) + "'"
def escape_string(data): """ Wrapper to escape a string """ return DrupyMySQL.mysqli_real_escape_string(lib_appglobals.active_db, data)
def escape_string(text): """ Prepare user input for use in a database query, preventing SQL injection attacks. """ return DrupyMySQL.mysqli_real_escape_string(lib_appglobals.active_db, text)