Automatic Value "Owner"
Posted: 2015-05-13 22:12
Hello,
please make a auomativ value "owner" (owner of this record)
Thanks much, Kai
please make a auomativ value "owner" (owner of this record)
Thanks much, Kai
A place where AppGini users can exchange ideas and help each other.
https://forums.appgini.com:443/phpbb/
https://forums.appgini.com:443/phpbb/viewtopic.php?f=6&t=1653
I want to update the ownership of a record by a value from a drop down field.Satya Kavala wrote: ↑2015-05-15 06:50Hi kai,
it may help you....
place the below code in after insert function of the related file in hooks folder
$qry="SELECT `groupID` FROM `membership_users` WHERE `memberID`='".$data['ClientID']."'";
$groupid=sqlValue($qry);
$qry2="INSERT INTO `membership_userrecords`(`tableName`, `pkValue`, `memberID`,`groupID`,`dateAdded`, `dateUpdated`) VALUES ('tablename','".$data['ID']."','".$data['ClientID']."','".$groupid."',UNIX_TIMESTAMP(now()),UNIX_TIMESTAMP(now()))";
sqlValue($qry2);
//here $data['ClientID'] is logged in member id