I am fetching results with query and using plugin and tags to display data on a page built by Control Panel. I need to display the total view count of each product. By default it is 0. the wierd thing if the count is greater than 0 it displays all right but if there is no view count means if count is 0 it does not display anything. I have tried conditions but they are also not working. How can i dispay 0 fetched from query using tags?
EDITED :
Here is what i am trying to do. This is the query
SELECT
ldc.id,
ldc.product_name,
ldc.product_viewed,
FROM default_products AS ldc
Here product_viewed is an integer field which contain the number of views by users. The default value for a new product is 0 (uploaded by admin).
This is tag i am using to display product_viewed
<table>
{{ Products:getProductsDetail }}
<tr>
<td>Product Name</td>
<td><h2>{{ product_name }}</h2></td>
<td>Hits</td>
<td>{{ product_viewed }}</td>
</tr>
{{ /Products:getProductsDetail }}
</table>
Everything is working fine except the {{ product_viewed }} because it contains 0. I have tested the query and its working fine fetching the results as expected but using Lex Parser tag it displays nothing. I have simplified my query here is image result
http://imageshack.us/photo/my-images/138/testmy.png/
You can see Hits : display nothing . This is what i am facing.
I have resolved the issue. I am using old version. Using latest version does not encounter this problem.