v5:reference:connection:substr
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
v5:reference:connection:substr [2016/04/10 15:02] – mnewnham | v5:reference:connection:substr [2016/04/10 23:42] – mnewnham | ||
---|---|---|---|
Line 6: | Line 6: | ||
string substr( | string substr( | ||
string $fieldName, | string $fieldName, | ||
- | | + | |
- | optional | + | optional |
) | ) | ||
</ | </ | ||
- | ===== Desscription | + | ===== Description |
The method '' | The method '' | ||
===== Parameters ===== | ===== Parameters ===== | ||
Line 26: | Line 26: | ||
<code php> | <code php> | ||
/* | /* | ||
- | * To return the first code plus the first 20 characters of a description. | + | * To return the an associative array of codes plus |
+ | * the first 20 characters of a description. | ||
*/ | */ | ||
$sql = " | $sql = " | ||
$data = $db-> | $data = $db-> | ||
</ | </ | ||
+ | |||
+ | ===== Negative Offsets ===== | ||
+ | Not all databases support the use of negative offsets (to return values based on the end of the string), so use in portable applications is not recommended. | ||
v5/reference/connection/substr.txt · Last modified: 2016/04/10 23:42 by mnewnham