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 14th May 2021 23:05 Europe/London time based on the source file dated 26th April 2021 17:35 Europe/London time.