Code: Select all
function table_after_insert($data, $memberInfo, &$args){
$id = $data['id'];
$nome = $data['nome'];
$cognome = $data['cognome'];
$preventivo = $data['preventivo'];
mysql_connect("localhost", "admin", "password") or die(mysql_error());
mysql_select_db("prova") or die(mysql_error());
mysql_query( "INSERT INTO Amministrazione (nome, cognome, preventivo) VALUES ('$nome', '$cognome', '$preventivo')") or die(mysql_error());
return TRUE;
}
But if I want create in table_after_update, i can't use this code, because if I use it, the fields are modified in the first table, but in the second table I have new fields. For to update the fields created, how can do?
Thank you very much.