<bdo id='XkKHY'></bdo><ul id='XkKHY'></ul>

    <tfoot id='XkKHY'></tfoot>

    <small id='XkKHY'></small><noframes id='XkKHY'>

  1. <i id='XkKHY'><tr id='XkKHY'><dt id='XkKHY'><q id='XkKHY'><span id='XkKHY'><b id='XkKHY'><form id='XkKHY'><ins id='XkKHY'></ins><ul id='XkKHY'></ul><sub id='XkKHY'></sub></form><legend id='XkKHY'></legend><bdo id='XkKHY'><pre id='XkKHY'><center id='XkKHY'></center></pre></bdo></b><th id='XkKHY'></th></span></q></dt></tr></i><div id='XkKHY'><tfoot id='XkKHY'></tfoot><dl id='XkKHY'><fieldset id='XkKHY'></fieldset></dl></div>

    <legend id='XkKHY'><style id='XkKHY'><dir id='XkKHY'><q id='XkKHY'></q></dir></style></legend>
    1. 计算视图中的结果数

      Count number of results in a View(计算视图中的结果数)
      <tfoot id='BjB12'></tfoot>
        <bdo id='BjB12'></bdo><ul id='BjB12'></ul>
      • <i id='BjB12'><tr id='BjB12'><dt id='BjB12'><q id='BjB12'><span id='BjB12'><b id='BjB12'><form id='BjB12'><ins id='BjB12'></ins><ul id='BjB12'></ul><sub id='BjB12'></sub></form><legend id='BjB12'></legend><bdo id='BjB12'><pre id='BjB12'><center id='BjB12'></center></pre></bdo></b><th id='BjB12'></th></span></q></dt></tr></i><div id='BjB12'><tfoot id='BjB12'></tfoot><dl id='BjB12'><fieldset id='BjB12'></fieldset></dl></div>

        <small id='BjB12'></small><noframes id='BjB12'>

          <legend id='BjB12'><style id='BjB12'><dir id='BjB12'><q id='BjB12'></q></dir></style></legend>
            <tbody id='BjB12'></tbody>

              1. 本文介绍了计算视图中的结果数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我需要计算有多少人属于预定义的组(这在 SQL 中使用 SELECT COUNT 语句很容易做到).我的视图查询运行良好并在我的表中显示实际数据,但我只需要知道它找到了多少结果.

                I need to count how many people belong in pre-defined groups (this is easy to do in SQL using the SELECT COUNT statement). My Views query runs fine and displays the actual data in my table, but I simply need to know how many results it found.

                但是,视图中似乎没有 COUNT 选项.我猜我将不得不使用某种视图挂钩,然后将结果粘贴到表格中.

                However there doesn't seem to be a COUNT option in views. I am guessing I am going to have to use some sort of views hook, and then stick the result in the table.

                这是我想要实现的目标的一个简单示例:

                Here's a quick example of what i'm trying to achieve:

                My Table
                ----------------------
                Group A | 20 people
                Group B | 63 people
                

                等等.

                (我已经尝试使用 Views_Calc 模块,但我收到错误,因为它还不是很稳定.)

                (I've tried using the Views_Calc module, but I get errors because it is not quite stable yet.)

                有人知道一种简单的方法来计算视图中的结果吗?

                Anybody know of an easy way to count results in Views?

                推荐答案

                这是一个很好的 d.o 主题:http://drupal.org/node/131031

                Here's a good d.o thread about it: http://drupal.org/node/131031

                尽管如果您只需要计数而不是 Views 提供的其他内容(字段格式和排序等),为什么不编写正确的 SELECT COUNT 语句并收工呢?

                Although if you JUST need the count and not the other things Views offers (field formatting & ordering, etc), why not just code up the proper SELECT COUNT statement and call it a day?

                (如果您确实需要 Views 提供的那些其他作品,上面有很多关于该线程的示例.)

                (If you DO in fact need those other pieces Views offers, there are many examples on that thread above.)

                这篇关于计算视图中的结果数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)
                <legend id='PTJ54'><style id='PTJ54'><dir id='PTJ54'><q id='PTJ54'></q></dir></style></legend>

                    <small id='PTJ54'></small><noframes id='PTJ54'>

                        <bdo id='PTJ54'></bdo><ul id='PTJ54'></ul>
                        <i id='PTJ54'><tr id='PTJ54'><dt id='PTJ54'><q id='PTJ54'><span id='PTJ54'><b id='PTJ54'><form id='PTJ54'><ins id='PTJ54'></ins><ul id='PTJ54'></ul><sub id='PTJ54'></sub></form><legend id='PTJ54'></legend><bdo id='PTJ54'><pre id='PTJ54'><center id='PTJ54'></center></pre></bdo></b><th id='PTJ54'></th></span></q></dt></tr></i><div id='PTJ54'><tfoot id='PTJ54'></tfoot><dl id='PTJ54'><fieldset id='PTJ54'></fieldset></dl></div>

                          <tbody id='PTJ54'></tbody>
                          <tfoot id='PTJ54'></tfoot>