Hi Ralf,
INSERT INTO egw_cal_repeats
(recur_type,recur_interval,recur_data,recur_exception,cal_id) VALUES
(2,1,16,NULL,‘cal_etag=cal_etag+1’,4539);
‘cal_etag=cal_etag+1’ (in single quotes) is a string, no sql.
I did some more looking into this. It looks like the problem begins at in
socal::save() Line 496:
$event[] = ‘cal_etag=cal_etag+1’; // always update the etag, even if none
given to check
This means that $event[0] == ‘cal_etag=cal_etag+1’. This has the intended
effect for an UPDATE, in egw_db::update() Line 1651:
$sql = "UPDATE $table SET ".
$this->column_data_implode(’,’,$data,True,true,$table_def[‘fd’]).’ WHERE '.
$where;
However, for an INSERT, which is needed for adding recurrence, we get
problems. egw_db::insert() Line 1578:
$sql = "$cmd INTO $table ".$this->column_data_implode(’,’,$data,‘VALUES’,true,
$table_def[‘fd’]).$sql_append;
egw_db::column_data_implode() allows integer keys, so we end up with a false
in the $keys array, which gets imploded for an INSERT, Line 1391:
return ($use_key===‘VALUES’ ? ‘(’.implode(’,’,$keys).’) VALUES (’ : ‘’).
implode($glue,$values) . ($use_key===‘VALUES’ ? ‘)’ : ‘’);
Perhaps egw_db::column_data_implode() needs to check to be sure $keys has no
integer/boolean values before returning the imploded array?
Thanks,
–
Peter Goerzen
I.S. Development
Hustler Turf Equipment/Excel Industries, Inc.
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft® Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
eGroupWare-developers mailing list
eGroupWare-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-developers