Hi, I'm a newbie and need help with this: I have two tables A and B. I want to update B after inserting a record in A.
Table A: User_id, Group_id ....
Table B: Group_id, .......
global $conn;
$Group_id = $values["Group_id"];
$User_id = $values["User_id"];
$select = "SELECT ... FROM Table_B WHERE ....= $Group_id";
$update1 = "UPDATE Table_B SET ...... ";
$update2 = "UPDATE Table_B SET ...... ";
$insert = "INSERT INTO Table_B( ..., ..., ... ) VALUES( $User_id, ...., .... )";
db_exec($select, $update1, $update2, $insert, $conn);
PROBLEM: From the add page it inserts the new record in Table A but then the ERROR: mysql_query(): supplied argument is not a valid MySQL-Link resource. Please any info on what I'm missing or how I can restructure?