dml_updateSelection [message #621] |
Sat, 10 February 2007 07:30 |
stephenboey
Messages: 54 Registered: January 2007
|
Member |
|
|
Not sure if this is a bug.
I have some business logic in _cm_pre_insertRecord ($rowdata)
Tried to do update statement like
'UPDATE '. $table .' SET rgt=rgt+2 WHERE rgt>='. $parent_rgt;
So, I did:
$where_parent_rgt = 'rgt>='. $parent_rgt;
$replace_parent_rgt = 'rgt=rgt+2';
_dml_updateSelection ($where_parent_rgt, $replace_parent_rgt);
Apparently, the method keeps updating rgt to 0 for the affected records.
When I tested with
$replace_parent_rgt = 'rgt=12';
all affected records were updated correctly with rgt = 12.
Seems like _dml_updateSelection is not able to deal with expressions with operators.
Is this a bug? If it is not, do you currenly have a function that allows me to do the above in the framework?
|
|
|