Collections functions
General functions
Node functions
Render functions
Theme permission functions
User 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 19th March 2024 06:35 Europe/London time based on the source file dated 8th March 2024 15:10 Europe/London time.