Title: Filter &amp; count the database
Last modified: July 14, 2017

---

# Filter & count the database

 *  [Krakeling](https://wordpress.org/support/users/krakeling/)
 * (@krakeling)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/filter-count-the-database/)
 * I recently started with CFDB (payed). It works easy and very well with CFormsII.
   Shortcodes are easy to create. It is realy fantastic.
 * Unfortunately, I’m rather inexperienced with PHP. I want to count the database
   based on a filter. But I always get to see the total. What am I doing wrong?
 *     ```
        include_once(ABSPATH . 'wp-content/plugins/contact-form-7-to-database-extension/CFDBShortcodeCount.php');
        $countShortCode = new CFDBShortcodeCount();
        $attributes = array('form' => 'Customerlist');
        add_filter( '$_GET(customercode)' , 'SalesColumn-123' );
        echo($countShortCode->handleShortCode($attributes));
        echo "<br/>";
        echo $_GET['customercode'];
       ```
   
    -  This topic was modified 8 years, 11 months ago by [Krakeling](https://wordpress.org/support/users/krakeling/).
    -  This topic was modified 8 years, 11 months ago by [Krakeling](https://wordpress.org/support/users/krakeling/).
    -  This topic was modified 8 years, 11 months ago by [Krakeling](https://wordpress.org/support/users/krakeling/).

The topic ‘Filter & count the database’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/contact-form-7-to-database-extension_ffffff.
   svg)
 * [Contact Form DB](https://wordpress.org/plugins/contact-form-7-to-database-extension/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7-to-database-extension/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Krakeling](https://wordpress.org/support/users/krakeling/)
 * Last activity: [8 years, 11 months ago](https://wordpress.org/support/topic/filter-count-the-database/)
 * Status: not resolved