I'm trying to record the user, title field and user id of the person opening the detail view if a record. I can get the user information, date and time with no problem, but the title field seems illusive.
Title is a field in the Safety_Video table, it contains the name of the subject discussed.
Code: Select all
function Safety_Topics_dv($selectedID, $memberInfo, &$html, &$args){
$mi = getMemberInfo();
$Ename = $mi['custom'][0];
$UserID = $mi['username'];
$Sql = "SELECT Title FROM Safety_Topics WHERE Safety_Topics.id = ('$selectedID')";
$V_title = sql($Sql,$eo);
$Sql = "INSERT INTO viewed (Employee_Name, Member_ID, Select_Title) VALUES ('$Ename', '$UserID', '$V_title') ";
sql($Sql, $eo);
}