there is a request to the database to add rows
INSERT INTO table1 (cal1, cal2) VALUES ('$val1', '$val2') In the same table there is an id field which is filled in by autoincrement.
The bottom line is that the next request for adding to another table should also record the newly created id , but I cannot catch it ..
nor so:
$query = "INSERT INTO table2 (version, id) VALUES ('$version1', 'SELECT MAX(`id`) FROM `table1`)'"; TestsDb::query($query); nor so:
$idA = mysqli_insert_id(); In this case, it sends 0, allegedly does not see the work with autoincrement.