Hi, Im trying to display a user email on a list using a calc element, the email its on a direfrent table ( usersext_perfil), so I put the user id on a variable ($usuario) and make a left join to the other table to get the email. I tryed it on phpmyadmin and the query works.
BUT it doesnt work on the calc field.
Any help?
thanks!
$db = JFactory::getDBO();
$usuario = '{reg_consultores_cv___usuario}');
$query = "SELECT u.email FROM reg_consultores_cv AS r JOIN usersext_perfil AS u ON r.usuario=u.id_de_usuario WHERE u.id_de_usuario=".$usuario"";
$db->setQuery( $query );
$mail = $db->loadResult();
return $mail;
BUT it doesnt work on the calc field.
Any help?
thanks!
$db = JFactory::getDBO();
$usuario = '{reg_consultores_cv___usuario}');
$query = "SELECT u.email FROM reg_consultores_cv AS r JOIN usersext_perfil AS u ON r.usuario=u.id_de_usuario WHERE u.id_de_usuario=".$usuario"";
$db->setQuery( $query );
$mail = $db->loadResult();
return $mail;