I'm trying to print a value from a group_concat query, but for some reason, the code keeps failing. If I print the array that contains my value, I am able to see that everything is being fetched correctly. But when I try to access the first element in the array, my page gives me a white screen. Why is this happening?
$db =& JFactory::getDBO();
$db->setQuery("SELECT GROUP_CONCAT( FieldValue )
FROM tpro_rsform_submission_values
WHERE FieldName
IN (
'LAST NAME', 'FIRST NAME'
)
GROUP BY SubmissionId");
$result = $db->loadObjectList();
foreach ($result as $r) {
echo var_dump($r);
}
// </code>
The following is the result for my var_dump($r)
but when I try to do a var_dump($r[0]), my page gives me a white screen.
Similarly, when I try to access the field through var_dump($r['GROUP_CONCAT(FieldValue)'])
I still get a white screen. How do can we access the field?