====== length ======
~~NOTOC~~
==Syntax==
string length(string $columnName)
===== Description =====
The method ''length()'' returns a database-specific SQL statement that retrieves the length of data in a field. This happens even when the field is defined as a fixed-length CHAR field, because the field's contents is trimmed before the length of the data is obtained.
Available since ADOdb 5.23.0.
===== Usage =====
/*
* Assume MySQL database
*/
$sql = $db->length(some_string_field);
/*
* Returns: LENGTH(TRIM(some_string_field);
*/
/*
* Assume Firebird database
*/
$sql = $db->length(some_string_field);
/*
* Returns: CHAR_LEN(TRIM(some_string_field);
*/