首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >一旦记录计数达到零,就删除输出?

一旦记录计数达到零,就删除输出?
EN

Stack Overflow用户
提问于 2014-04-15 16:10:36
回答 1查看 43关注 0票数 0

如果RECORDCOUNT=0的话,我正在试图弄清楚如何删除/删除这个输出。如果是RecordCount=0,我不想显示输出。也许有一种更好的方式来用表格来展示这个?但这个很管用。

我一直在网上寻找任何帮助,但我找不到什么东西可以帮助我。

代码语言:javascript
复制
<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>
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-04-15 16:17:54

根据您需要显示的内容,在整个div /输出周围进行记录计数检查。

代码语言:javascript
复制
<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>
票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/23089056

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档