• Resolved nevorin

    (@nevorin)


    Hi,

    I would like to display number of people registered through the form I created.
    On the plugin main page, column “count” clearly indicates it. how can I find this value?

    Thanks you very much.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Arshid

    (@arshidkv12)

    Try as follows

    global $wpdb;
     $cfdb = apply_filters( 'cfdb7_database', $wpdb );
     $table_name = $cfdb->prefix.'db7_forms';
     $form_post_id = 1; //change it
    $submission_count = $cfdb->get_var( "SELECT COUNT(*) FROM $table_name" where form_post_id=$form_post_id );
    • This reply was modified 6 years, 7 months ago by Arshid.
    Thread Starter nevorin

    (@nevorin)

    I’m just a webdesigner and I don’t know a lot about PHP.
    I must copy this code on functions.php ? Or directly on my page ?

    When I copy this on functions.php, wordpress failed.

    There is a function like counter() or something like this ? To implant directly on my code or on wysiwyg editor ?

    Thanks

    Plugin Author Arshid

    (@arshidkv12)

    Sorry… It is basic function. You need advanced coding knowledge. Please feel free to PM. I can help you.

    Thread Starter nevorin

    (@nevorin)

    Ok. How can I join you ?

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Count entries’ is closed to new replies.