cheyennemtnman
Member
Thanks for taking a look once again... still getting a blank page
here is the code I had inserted with Hugh and Your help...
Where does this code know that I want to use connected database... seems to me it is looking for site database...
here is the code I had inserted with Hugh and Your help...
Code:
$user = JFactory::getUser();
$email = $user->get('email');
$db = JFactory::getDbo();
$db->setQuery("SELECT * FROM tr_survey_list WHERE email=" . $db->Quote($email));
$rows = $db->loadObjectList();
$list = array();
foreach ($rows as $row)
{
$tablename = $row->tr_survey_table_name;
$query="SELECT status FROM ".$tablename." WHERE email=".$db->Quote($email);
$db->setQuery($query);
$surveystatus= $db->loadResult();
$list[] = '<li><a href="' . $row>tr_survey_link . '"> ' . $row->Survey_Subject . '</a> - ' . $row->Evaluator_Type .'___'. $surveystatus . '</li>';;
}
return '<ol>' . implode($list) . '</ol>';
Where does this code know that I want to use connected database... seems to me it is looking for site database...