Sunday, October 23, 2022
HomeWordPress Developmentsql - get the sum of every publish with the identical...

sql – get the sum of every publish with the identical date


right here, I’ve a desk that exhibits the publish with duplicate date:

enter image description here

this is my question to point out all of this

    $user_info = get_userdata(get_current_user_id());
    $username = $user_info->user_login;

    //question
    $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
    $args = array(
        'post_type' => $type_arr,
        'posts_per_page' => -1,
        'orderby' => 'menu_order',
        'order' => 'ASC',                                   
        'post_status' => array('publish'),
        'paged' => $paged,
        'meta_key' =>  'sponsor_username',
        'meta_value' =>   $username,
        'meta_compare' => '=',
    

    );
    $the_query = new WP_Query( $args );
?>`

I wish to summarize the quantity of the all publish with the identical date

Instance:

| Date      | Whole Quantity |
|:--------- |:------------:|
|22/10/2022 |     750      |
|21/10/2022 |     150      |

how can I do that any ideas?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments