Quote:
Originally Posted by npugila1983 hi
I want to insert a record in member table and after that i want insert record in the members roles table for the current user.
After inserting into the member table i need the member id of the last inserted user. Then only i can able toinsert record into the role table.
I am using the store() function to insert this both.
How can i get the member id. ie, last insert_id |
Hi Pugal
At first you have to insert data to the first table using store funtion then you can bind the second class using the variable used in the first class for example
$oRow=mosUser($database);
$oRow->id='';
$oRow->username=$_request['user'];
$oRow->password=$_request['user'];
$oRow->store();
$oRowProfile=mosUserProfile($database);
$oRowProfile->id='';
$oRowProfile->userid=
$oRow->id;
$oRowProfile->name=$_request['name'];
$oRowProfile->Store();
I think its helpful for you
Regards
Falcon
