Hi there,
I am trying to create a dynamic menu. I'm not getting any error messages but only the first link and image is being shown.
Heres the code i'm using.
<cfquery name="getCategory" datasource="dunskii" dbtype="ODBC">
SELECT prod_category.prod_cat_id AS catID, prod_category.name AS catNAME, prod_site_cat.prod_cat_id, prod_site_cat.site_id, site_details.site_id AS siteID, site_details.postcode AS postCODE FROM prod_category INNER JOIN ( prod_site_cat INNER JOIN site_details ON prod_site_cat.site_id = site_details.site_id ) ON prod_category.prod_cat_id = prod_site_cat.prod_cat_id WHERE site_details.site_id = #ID#
</cfquery>
<TABLE BORDER="0" align="center">
<cfoutput query="getCategory">
<CFIF CurrentRow MOD 1 IS 1>
<TR>
</CFIF>
<TD width="50%" align="center" nowrap><a href="category.cfm?ID=#catID#"><img scr="../images/cat_buttons/#postCODE#-#siteID#-#catNAME#-1.gif" border="0">#catNAME#</a></TD>
<CFIF CurrentRow MOD 1 IS 0>
</TR>
</CFIF>
</cfoutput>
<CFIF getCategory.RecordCount MOD 1 IS NOT 0>
<CFSET ColsLeft = 1 - (getCategory.RecordCount MOD 1)>
<CFLOOP FROM = "1" TO = "#ColsLeft#" INDEX = "i">
<TD> </TD>
</CFLOOP>
</TR>
</CFIF>
</TABLE>
cheers
d
I am trying to create a dynamic menu. I'm not getting any error messages but only the first link and image is being shown.
Heres the code i'm using.
<cfquery name="getCategory" datasource="dunskii" dbtype="ODBC">
SELECT prod_category.prod_cat_id AS catID, prod_category.name AS catNAME, prod_site_cat.prod_cat_id, prod_site_cat.site_id, site_details.site_id AS siteID, site_details.postcode AS postCODE FROM prod_category INNER JOIN ( prod_site_cat INNER JOIN site_details ON prod_site_cat.site_id = site_details.site_id ) ON prod_category.prod_cat_id = prod_site_cat.prod_cat_id WHERE site_details.site_id = #ID#
</cfquery>
<TABLE BORDER="0" align="center">
<cfoutput query="getCategory">
<CFIF CurrentRow MOD 1 IS 1>
<TR>
</CFIF>
<TD width="50%" align="center" nowrap><a href="category.cfm?ID=#catID#"><img scr="../images/cat_buttons/#postCODE#-#siteID#-#catNAME#-1.gif" border="0">#catNAME#</a></TD>
<CFIF CurrentRow MOD 1 IS 0>
</TR>
</CFIF>
</cfoutput>
<CFIF getCategory.RecordCount MOD 1 IS NOT 0>
<CFSET ColsLeft = 1 - (getCategory.RecordCount MOD 1)>
<CFLOOP FROM = "1" TO = "#ColsLeft#" INDEX = "i">
<TD> </TD>
</CFLOOP>
</TR>
</CFIF>
</TABLE>
cheers
d