Here is what I have and what I would like to do is in ALLCAPS in the link path (I need to get the category name of the linked entry there). Can anyone help me achieve that?
<ul class="relatedProjects">
<li>{related_entries id="client"}Client: <span>{title}</span>{/related_entries}</li>
<li>Related Projects: {exp:query sql="SELECT exp_weblog_titles.title as my_title, exp_weblog_titles.url_title as my_url_title
FROM (exp_relationships INNER JOIN exp_relationships AS exp_relationships_1 ON exp_relationships.rel_child_id = exp_relationships_1.rel_child_id) INNER JOIN exp_weblog_titles ON exp_relationships_1.rel_parent_id = exp_weblog_titles.entry_id
WHERE (((exp_relationships.rel_id)={client}) AND exp_weblog_titles.weblog_id=4) ORDER BY exp_weblog_titles.entry_date"}
{if my_url_title != segment_3}<a href="http://{path=/graphics-projects/CATEGORY_NAME/">{my_title}</a>{/if}
{/exp:query}</li>
</ul>So I would like to query the category of each of those related entries as well so I can add that category name to the link path (category name is same as template name) - otherwise the links to those entries don’t work… I’m not too savvy with sql queries - I received help for the one written above - so any help is appreciated! thx