如果RECORDCOUNT=0的话,我正在试图弄清楚如何删除/删除这个输出。如果是RecordCount=0,我不想显示输出。也许有一种更好的方式来用表格来展示这个?但这个很管用。
我一直在网上寻找任何帮助,但我找不到什么东西可以帮助我。
<cfquery datasource ="Intranet" name="GetDeptSubmissions">SELECT * FROM CSEReduxResponses</cfquery>
<cfquery dbtype="query" name="GetPending">SELECT * FROM GetDeptSubmissions WHERE status = 1 AND execoffice_status = 0</cfquery>
<cfquery dbtype="query" name="GetApproved">SELECT * FROM GetDeptSubmissions WHERE status = 1 AND execoffice_status = 1</cfquery>
<cfquery dbtype="query" name="GetDenied">SELECT * FROM GetDeptSubmissions WHERE status = 1 AND execoffice_status = 2</cfquery>
<cfoutput>
<h2>Comments / Ratings Administration</h2>
<div>
<div class="display_count pending_outer">
<div class="display_count_desc pending_inner">Pending</div>
<cfif GetPending.RecordCount gt 0><a href="cse_execoffice_pending.cfm"></cfif>
<span class="display_count_number">#GetPending.RecordCount#</span>
<cfif GetPending.RecordCount gt 0></a></cfif>
</div><!--- /div class="display_count" --->
..........................
</div>
</cfoutput>发布于 2014-04-15 16:17:54
根据您需要显示的内容,在整个div /输出周围进行记录计数检查。
<cfif GetPending.RecordCount gt 0>
<div class="display_count pending_outer">
<div class="display_count_desc pending_inner">Pending</div>
<span class="display_count_number">
<a href="cse_execoffice_pending.cfm">#GetPending.RecordCount#</a>
</span>
</div>
</cfif>https://stackoverflow.com/questions/23089056
复制相似问题