fix for pgsql 7.3

This commit is contained in:
Ralf Becker 2003-07-08 23:19:18 +00:00
parent 70a6356dd8
commit bfc88e430d

View File

@ -320,7 +320,7 @@
} }
$this->data[$key] = $val; // update internal data $this->data[$key] = $val; // update internal data
switch($val['type']) // protection against query-insertion switch($db_cols[$key]['type']) // protection against query-insertion
{ {
case 'int': case 'auto': case 'int': case 'auto':
$val = intval($val); $val = intval($val);
@ -329,9 +329,9 @@
$val = "'".$this->db->db_addslashes($val)."'"; $val = "'".$this->db->db_addslashes($val)."'";
break; break;
} }
$cols .= ($cols ? ',' : '').$key; $cols .= (strlen($cols) ? ',' : '').$key;
$vals .= ($vals ? ',' : '').$val; $vals .= (strlen($vals) ? ',' : '').$val;
$query .= ($query ? ',' : '')."$key=$val"; $query .= (strlen($query) ? ',' : '')."$key=$val";
} }
} }
if (($this->data['info_id'] = intval($values['info_id'])) > 0) if (($this->data['info_id'] = intval($values['info_id'])) > 0)