Query on calc element

zucchetti

Member
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;
 

Attachments

  • calc.png
    calc.png
    17.1 KB · Views: 28
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top