$result = pg_query($GLOBALS["conn"], "INSERT INTO SimuladoQuestoes (SQAssunto, SQQuestao, SQRespCerta, SQRespErrada1, SQRespErrada2, SQRespErrada3, SQRespErrada4) VALUES (" . $intAssuntoID . ", '" . $strConteudo . "', '" . $strRespCerta . "', '" . $aryRespErrada[1] . "', '" . $aryRespErrada[2] . "', '" . $aryRespErrada[3] . "', '" . $aryRespErrada[4] . "');") or $erros .= "<LI>" . pg_last_error();
eu queria uma função que inseri o registro e já me retorna o codigo do registro...
se alguem puder me ajudar....
valews