Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video functions
Resource functions

sql_truncate_text_val()

Description

Query helper to ensure code honours the database schema constraints on text columns.
IMPORTANT: please use where appropriate! In some cases, truncating may mean losing useful information (e.g contextual data),
in which case changing the column type may be a better option.

Parameters

ColumnTypeDefaultDescription
$v string String value that may require truncating
$len integer Desired length (limit as imposed by the database schema). {@see https://www.resourcespace.com/knowledge-base/developers/database_schema}

Return

string

This article was last updated 28th February 2021 15:05 Europe/London time based on the source file dated 19th February 2021 16:00 Europe/London time.