fixed new uid creation: uid is not null, so we need to write a dummy-value, before we knew the actual id

This commit is contained in:
Ralf Becker 2004-05-29 08:01:37 +00:00
parent 1f799dd84d
commit 200b99cd9f

View File

@ -584,8 +584,8 @@
$this->stream->lock($locks); $this->stream->lock($locks);
if($event['id'] == 0) if($event['id'] == 0)
{ {
$this->stream->query('INSERT INTO phpgw_cal(title,owner,priority,is_public,category) ' $this->stream->query('INSERT INTO phpgw_cal(uid,title,owner,priority,is_public,category) '
. "values('".$this->stream->db_addslashes($event['title']) . "values('*new*','".$this->stream->db_addslashes($event['title'])
. "',".(int)$event['owner'].','.(int)$event['priority'].','.(int)$event['public'].",'" . "',".(int)$event['owner'].','.(int)$event['priority'].','.(int)$event['public'].",'"
. $event['category']."')",__LINE__,__FILE__); . $event['category']."')",__LINE__,__FILE__);
$event['id'] = $this->stream->get_last_insert_id('phpgw_cal','cal_id'); $event['id'] = $this->stream->get_last_insert_id('phpgw_cal','cal_id');