>First, check how many records are returned by the query against the
>database to make sure your query is returning the correct results.
>
>Second, in general the group attribute of the cfoutput tag should
>match the ORDER BY clause in the query. So if you want to group by
>netid then you should have ORDER BY netid, publication_date or it
>won't work they way you want. I don't think you need group =
>"citation" based on your description. Your inner-most cfoutput tag
>generally will not have any group attribute.
>
>Good luck,
>Mike Chabot
>
>On Jan 23, 2008 3:35 PM, Adam Parker <[EMAIL PROTECTED]> wrote:
>>
Hi Mike -
The query appears to be retrieving the correct results, but I have tried a
different approach used in CF WACK: concatenating queries.
My query is now:
<cfif (faculty is not "0")>
and Directory.NETID = '#form.faculty#'
OR PUBLICATIONS.AUTHOR2 = '#form.faculty#'
OR PUBLICATIONS.AUTHOR3 = '#form.faculty#'
OR PUBLICATIONS.AUTHOR4 = '#form.faculty#'
OR PUBLICATIONS.AUTHOR5 = '#form.faculty#'
OR PUBLICATIONS.AUTHOR6 = '#form.faculty#'
OR PUBLICATIONS.AUTHOR7 = '#form.faculty#'
OR PUBLICATIONS.AUTHOR8 = '#form.faculty#'
</cfif>
<cfif (discipline is not "0")>
AND PUBLICATIONS.discipline = '#form.discipline#'
</cfif>
<cfif (pubYear is not "0")>
AND PUBLICATIONS.publication_date = '#form.pubYear#'
</cfif>
order by directory.netid, directory.lastname, directory.firstname
The output is now:
<cfif #qGetPublications.RecordCount# GTE 1>
<h4>Available Publications<cfoutput>:
qGetPublications.RecordCount#</cfoutput></h4>
<cfif qGetPublications.recordcount gte 1>
<ul>
<p>
<cfoutput query="qGetPublications">
<em>#citation#</em><br /><br />
</cfoutput>
</p>
</ul>
<cfelse>
<p>No publications meet your criteria.</p>
</cfif>
</cfif>
What this is not doing, and I intend it to do(at least want it to do), is that
if all 3 select lists are chosen and a combination does not exist, "No
publications meet your criteria." should display.
Am I missing something?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w
Archive:
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:3255
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15