On Wednesday 10 September 2003 14:27, Jules Alberts wrote:
>
> I use it to force lowercase of values inserted in the db. There is one
> problem though, if the parameter is absent, the function will give an
> error message. I would like it to rather check for null before tolower
> is applicated. In semicode:
>
> if ($1 <> NULL) {
> set NEW($1) [string tolower $NEW($1)]
> }
> return [array get NEW]'
>
> but I have no idea how to do this in TCL. Can somebody please tell me?
> Thanks a lot!
According to the manuals:
$NEW
An associative array containing the values of the new table row for
INSERT/UPDATE actions, or empty for DELETE. The array is indexed by field
name. Fields that are NULL will not appear in the array!
Is that any use?
--
Richard Huxton
Archonet Ltd