Oh, it's just a simple insert:
$qry = "INSERT INTO tbl1(code, user, duty, seq,role, email) VALUES('$mycode',$uid,'$duty',$seq,'$_role','$_email')";
$db->query($qry);
The primary key column (proc_id) isn't mentioned in the query.
It works fine for months. Yesterday...