Hi guys im trying to do an alphabetic list managed by categories, im new at this so maybe im just doing something wrong… what i do is print with php the letters with a link that sends me to a products list, when i have entries i get the products but when not i print a message that says no products with letter “D”, the problem is when there are entries related to other categories i got no message like if it was found in the query and then prints nothing… ill show u my code to see if u can see the problem.
URL here is like—>{site_url}/index.php/instrumentos/producto2/category/violinistas/u
{exp:channel:category_heading channel="instrumentos"}
{exp:query sql="SELECT title, url_title AS urlt, cat_id FROM exp_channel_titles NATURAL JOIN exp_category_posts WHERE channel_id = '4' AND cat_id = '{category_id}' AND title LIKE '{segment_5}%' ORDER BY title ASC"}
{embed="instrumentos/lista" link="{urlt}"}
{if no_results}
no product with letter {segment_5}{category_id}
{/if}
{/exp:query}
{/exp:channel:category_heading}embed lista code
{exp:channel:entries channel="instrumentos" limit ="1" url_title="{embed:link}" }
<h3>{nombre_instrumento}</h3>
<p> <br />
{imagen_instrumento}<br />
<br />
Descripcion: {descripcion_instrumento}<br />
<br />
<br />
Precio: {precio}<br />
<br />
{/exp:channel:entries}