I created this event on master add page:-
function AfterAdd($values,$keys,$inline)
{
//get last insert record id
$last_id = mysql_insert_id(); // for checking only
print_r ($last_id); // for checking only
//** Save new data in another table ****
global $conn,$user_exercise;
$strSQLInsert = "INSERT INTO user_exersise (User_id, User_Workout_id, exersize_id) values (";
$strSQLInsert .= $values[$_SESSION['OwnerID']].",";
$strSQLInsert .= $values[mysql_insert_id()];
$strSQLInsert .= $values["1"];
$strSQLInsert .= ")";
db_exec($strSQLInsert,$conn);
this results in error:-
8
Error description Undefined offset: 71
URL localhost/members/op1/user_workout_add.php?
Error file C:\xampp\htdocs\members\op1\include\user_workout_events.php
Error line 38
SQL query insert into user_workout
(user_workout.Workout_id, user_workout.Workout_Date, user_workout.Workout_Time_Length, user_workout.User_id) values (2, '2011-02-17', 5, 1)
which is the master table add function
71 is correct value of mysql_insert_id()
any suggestion appreciated