Hello all,
I have a number of tables, two are called:
tbl_users (a list of users used to login)
tbl_orghistory (a table to record contact information on customers)
In the table tbl_orghistory, there is a field called his_enteredby and this is automatically populated by the username of the logged in user using the delegate class called tbl_orghistory.php which looks like:
class tables_tbl_orghistory {
function his_enteredby__default(){
$auth =& Dataface_AuthenticationTool::getInstance();
return $auth->getLoggedInUsername();
}
}
This is okay, but i want to automatically populate the field his_enteredby with the ID of the user from field usr_id
The Users table is shown below:
usr_id int(6)
usr_username varchar(32)
usr_password varchar(32)
usr_role enum('READ ONLY','NO ACCESS','ADMIN')
usr_firstname char(255)
usr_lastname char(255)
usr_status int(6)
Any help would be greatly appreciated.
Many thanks, Tom