I would like to load a default value to a field (emailuser).
in eval mode I put this code and it works
$myDb = JFactory::getDbo();
$myQuery = $myDb->getQuery(true);
$myQuery
->select('Email')
->from('tm_anagrafica_clienti')
->where('id = ' . $myDb->quote('42'));
$myDb->setQuery($myQuery);
$Email = $myDb->loadResult();
return $Email;
Now I would like to replace the value 42 with a placeholder of the same table where the field (emailuser), but when I insert the placeholder {tm_allenamenti___utente_all} .......does not work
how can I change the script?
thank you
in eval mode I put this code and it works
$myDb = JFactory::getDbo();
$myQuery = $myDb->getQuery(true);
$myQuery
->select('Email')
->from('tm_anagrafica_clienti')
->where('id = ' . $myDb->quote('42'));
$myDb->setQuery($myQuery);
$Email = $myDb->loadResult();
return $Email;
Now I would like to replace the value 42 with a placeholder of the same table where the field (emailuser), but when I insert the placeholder {tm_allenamenti___utente_all} .......does not work
how can I change the script?
thank you