>...
>mysql_query(...);
>$_SESSION['lastId'] = mysql_insert_id();
>HTH
>Micha
Hi Micha,
I think that it a bit more complicated.
I can't find any occurrence of that mysql call.
I used MX Kollection INSERT FORM function.
here is the code (partially):
===============================
<? // Load the common classes
require_once('../includes/common/KT_common.php');
// Load the tNG classes
require_once('../includes/tng/tNG.inc.php');
// Make a transaction dispatcher instance
$tNGs = new tNG_dispatcher("../");
// Make unified connection variable
$conn_test_conn = new KT_connection($tes_conn, $database_test_conn);
// Start trigger
$formValidation = new tNG_FormValidation();
$tNGs->prepareValidation($formValidation);
// End trigger
// Make an insert transaction instance
$ins_rl_test = new tNG_insert($conn_test_conn);
$tNGs->addTransaction($ins_rl_test);
// Register triggers
$ins_rl_test->registerTrigger("STARTER", "Trigger_Default_Starter", 1,
"POST", "KT_Insert1");
$ins_rl_test->registerTrigger("BEFORE",
"Trigger_Default_FormValidation", 10, $formValidation);
$ins_rl_test->registerTrigger("END", "Trigger_Default_Redirect", 99,
"2.php?idp1={id_rl}");
// Add columns
$ins_rl_test->setTable("rl_test");
$ins_rl_test->addColumn("nome_rl", "STRING_TYPE", "POST", "nome_rl");
$ins_rl_test->addColumn("cognome_rl", "STRING_TYPE", "POST",
"cognome_rl");
$ins_rl_test->addColumn("datanascita_rl", "DATE_TYPE", "POST",
"datanascita_rl");
$ins_rl_test->addColumn("cancellato_rl", "STRING_TYPE", "POST",
"cancellato_rl");
$ins_rl_test->addColumn("cancellato_data_rl", "DATE_TYPE", "POST",
"cancellato_data_rl");
$ins_rl_test->setPrimaryKey("id_rl", "NUMERIC_TYPE");
// Execute all the registered transactions
$tNGs->executeTransactions();
// Get the transaction recordset
$rsrl_test = $tNGs->getRecordset("rl_test");
$row_rsrl_test = mysql_fetch_assoc($rsrl_test);
$totalRows_rsrl_test = mysql_num_rows($rsrl_test);
?>
===========================
as you can see, all data is processed by other functions in other
included files....

.
I think I need to better understand the TNG engine and try to create a
little trigger that creates a session variable just after inserting
the record in the db.
I already tried to do so, honestly, but with really poor results.
Ciao Micha.

.
tony
>> Stay informed about: [php+mysql] how to get the inserted record ID?