marcq
Member
Happy New Year !
Hi,
I'm creating my first email template (please see EMAILTEMPLATECONF.txt attached) which works almost fine, when I'm displaying values with {placeholders}.
I'm now trying to creating a query in order to display a value from another table :
I'm trying to display the "gprh_fabrik_user_training.documents_a_fournir" value with :
Instead of displaying some text, the query is displaying the "gprh_fabrik_user_enrollment.id" value "80" (Please see Confirmation d'inscription.pdf attached, second paragraph following "PROCEDURE DE VALIDATION DE VOTRE INSCRIPTION").
Would appreciate if someone could explain me why and how to solve this.
Thanks a lot in advance.
Cheers,
Marc
Hi,
I'm creating my first email template (please see EMAILTEMPLATECONF.txt attached) which works almost fine, when I'm displaying values with {placeholders}.
I'm now trying to creating a query in order to display a value from another table :
Code:
$candidateid = JRequest::getVar('gprh_fabrik_user_enrollment___id');
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query
->select('gprh_fabrik_user_enrollment.id, gprh_fabrik_user_training.documents_a_fournir')
->from('gprh_fabrik_user_enrollment')
->leftJoin('gprh_fabrik_user_enrollment_repeat_choix_formation ON gprh_fabrik_user_enrollment.id = gprh_fabrik_user_enrollment_repeat_choix_formation.parent_id')
->leftJoin('gprh_fabrik_user_training_124_repeat ON gprh_fabrik_user_enrollment_repeat_choix_formation.choix_formation = gprh_fabrik_user_training_124_repeat.id')
->leftJoin('gprh_fabrik_user_training ON gprh_fabrik_user_training_124_repeat.parent_id = gprh_fabrik_user_training.id')
->having('gprh_fabrik_user_enrollment.id = ' . $db->quote($candidateid));
$db->setQuery($query);
// var_dump((string)$query);
$docscandidat = $db->loadResult();
I'm trying to display the "gprh_fabrik_user_training.documents_a_fournir" value with :
Code:
<p><span style="font-family: arial, helvetica, sans-serif; font-size: 11pt;"><?php echo $docscandidat; ?></span></p>
Instead of displaying some text, the query is displaying the "gprh_fabrik_user_enrollment.id" value "80" (Please see Confirmation d'inscription.pdf attached, second paragraph following "PROCEDURE DE VALIDATION DE VOTRE INSCRIPTION").
Would appreciate if someone could explain me why and how to solve this.
Thanks a lot in advance.
Cheers,
Marc
Attachments
Last edited: