--- html/osoba.php 2000/06/28 07:28:34 1.5 +++ html/osoba.php 2000/06/28 11:57:55 1.6 @@ -170,6 +170,9 @@ } + $result=pg_Exec($conn,"insert into promjene_osobe + select * from osobe where id=$id"); + $promjene_osobe_oid=pg_getlastoid($result); $sql="update osobe set ime='$ime',prezime='$prezime',zap_plive='$zap_plive', sifra='$sifra', org_jed_id=$org_jed_id, @@ -187,6 +190,10 @@ if ($result) { $warn.="

Podaci su promjenjeni..."; $result=pg_Exec($conn,"insert into status (osoba_id,kontakt_osoba_id,datum,status_tip_id) values ($id,$kontakt_osoba_id,'now'::datetime,2)"); + $status_oid=pg_getlastoid($result); + $result=pg_Exec($conn,"select id from status where oid=$status_oid"); + $row=pg_fetch_array($result,0); + $result=pg_Exec($conn,"update promjene_osobe set status_id=$row[id] where oid=$promjene_osobe_oid"); } else { $warn.="

Greška kod mijenjanja podataka";