Hello Kyle,
Thanks for the above, it "sort" of works.
It returns:
whole_name
Which links to the user's profile but obviously isn't displaying the actual name of the person.
I have adapted the query to:
Code:
select t2.id, CONCAT( " ", t2.firstname, t2.lastname) as whole_name
FROM #__comprofiler as t1, #__comprofiler as t2
where t1.cb_service_name = t2.cb_service_name
and t2.cb_role = "team_leader"
and t1.user_id = [user_id]
This query returns the correct user(s) profile when used in conjunction with the:
Code:
<div><a href="index.php?option=com_comprofiler&view=userprofile&user=[column_id]">whole_name</a></div>
But still displays "whole_name".
Having researched on various sites and resources, I thought the query might need a variable in order to pass the result to the hyperlink and came up with:
Code:
declare name varchar (25)
set name = t2.id, CONCAT( " ", t2.firstname, t2.lastname)
FROM #__comprofiler as t1, #__comprofiler as t2
where t1.cb_service_name = t2.cb_service_name
and t2.cb_role = "team_leader"
and t1.user_id = [user_id]
But that returns an error.
Then I tried placing the name of the field in the hyperlink row as follows:
Code:
<div><a href="index.php?option=com_comprofiler&view=userprofile&user=[column_id]">[cb_team_leader]</a></div>
But this crashed the server big style! Please don't tell my hosting provider it was me!!!!
How do I fix the issue and have it display the user's name correctly please?
Many thanks.