Back

Editing, Updating and Creating Records
eventPreUpdateField
Name of function to call before every field is processed for updates This function should have 3 parameters. $colname is the field name, &$data is the data and $type is the ADODB data type (not the native type). For $data, dates are passed as strings in 'Y-m-d h:i:s' format, eg. 4pm 23rd February 2002 is '2002-02-23 16:00:00'. Strings are passed without quoting. Do not quote strings yourself because phpLens does it for you. For $type, legal values are X (long text), B (blob/image), D (date), T (timestamp), C (char), N (numeric), I (integer). See ADODB readme.htm documentation. Returns a value of -1 to skip this field when updating, 0 to cancel all updates, and 1 to continue updating. There is no eventPostUpdateField property. Syntax `// return -1 = skip processing this field // return 0 = cancel UPDATE sql // return 1 = process this field and continue UPDATE sql function UpdateField($colname,&$data,$type) { print "<BR>$colname[$type] = $data"; return 1; // update everything } $lens->eventPreUpdateField = 'UpdateField';` Basic:No Advanced/Enterprise:Yes DynamicEdit:No [Version 1.0]