Hi all,
I’m pretty green to the SQL module, but I am trying to call up two of my custom weblog fields and have the results displayed in a table using the Query Module tag.
I actually have that part working:
http://lynndouglasmedia.com/EE/index.php/TEST_FILES/query_in_table/
I am wondering if anyone knows how I can prevent the blank/empty rows from showing up. I am assuming that the empty rows are showing up because the query is pulling data from “exp_weblog_data” and the blank rows are those entries that don’t use my custom fields. Here’s my short query code:
{exp:query sql="SELECT field_id_6, field_id_7 FROM exp_weblog_data" ORDER BY field_id_7 ASC}
<table border=“1” width=“650”>
<tr>
<td width=“50”>{field_id_7}</td>
<td width=“600”>{field_id_6}</td>
</tr>
</table>
{/exp:query}
Also, the ORDER BY parameter does not work; any ideas?
Thanks.
[Mod Edit: Moved to the How-To forum as it is more appropriate]