$AddRecord6 = mysqli_query($con,"INSERT INTO tbl_t_records(PerformanceID,QuizID,ProjectID,ExamID,AttendanceID,fuck)
VALUES(LAST_INSERT_ID(),LAST_INSERT_ID(),LAST_INSERT_ID(),LAST_INSERT_ID(),LAST_INSERT_ID(),'1')")or die(mysqli_error($con));
我不能使用多个LAST_INSERT_ID()它只允许第一个LAST_INSERT_ID(),我不能使用MAX(id),因为它不好
答案 0 :(得分:0)
首先在PHP中获取最后一个插入ID!
$lastId = mysqli_insert_id($conn);