omitting 'INSERT INTO table col=val' for pgsql-compatibility

This commit is contained in:
Ralf Becker 2001-07-19 23:00:51 +00:00
parent 58d7129099
commit 1db9edc55e

View File

@ -237,23 +237,23 @@
{
$val = addslashes($val);
}
if ($query) $query .= ',';
$query .= "$key='$val'";
$cols .= ($cols ? ',' : '').$key;
$vals .= ($vals ? ',' : '')."'$val'";
$query .= ($query ? ',' : '')."$key='$val'";
}
}
if ($values['info_id'])
{
$query = 'update phpgw_infolog set '.$query.' where info_id=\'' .
$values['info_id'] .'\'';
$query = "UPDATE phpgw_infolog SET $query where info_id='".$values['info_id']."'";
}
else
{
$query = 'insert INTO phpgw_infolog set '.$query;
$query = "INSERT INTO phpgw_infolog ($cols) VALUES ($vals)";
/*
* need to set $this->data['info_id'] with assigned autoincrement id
* now data will be rereaded
*/
}
}
$this->db->query($query,__LINE__,__FILE__);
}