VOI
Member
Hi,
i have a problem using the calc element. I want to fetch a value from the DB, display it and save it.
The problem is that the value is displayed correctly, but not stored to the DB.
Here is my calc element code, maybe someone can tell me what i did wrong:
The ajax observed field is timerec___project_title.
Thanks for your help.
i have a problem using the calc element. I want to fetch a value from the DB, display it and save it.
The problem is that the value is displayed correctly, but not stored to the DB.
Here is my calc element code, maybe someone can tell me what i did wrong:
PHP:
$ddval = JRequest::getVar('timerec___project_title');
$db = FabrikWorker::getDbo();
$query = "SELECT `project_number` FROM `projects` WHERE `project_title` = '$ddval'";
$db->setQuery($query);
$views = $db->loadResult();
return $views;
The ajax observed field is timerec___project_title.
Thanks for your help.