skip to Main Content

sorry for my English, how can I display the number of times of subscription of a member based on their (member id) in the database? because the output shows the number or times of subscription of all the members.
so basically I want to display the number of times they subscribe (subscription start and subscription end) base on their member id in the database. I hope you can help me. thank you

Output

database

Code

2

Answers


  1. You need to make one file for fetch the data into table format, so it can be useful for better understanding.

    After that you need to fetch the data from table using while loop so it will iterate through your last record. In while loop you just need to use and for place the sample output for your data. Outside while loop just define and after complete while loop just close the tag

    Reference : https://codingstatus.com/display-data-in-html-table-using-php-mysql/

    Login or Signup to reply.
  2. I hope this select query help you but you have to pass member_id in select query which give you subscription count of a member for time periods.

    select
        count(*) as subscribed_count,
        DATE(subscription_start) as start_date,
        DATE(subscription_end) as end_date
    from apikit_docs
    where member_id='**#member_id#**'
    group by start_date,end_date
    order by start_date desc
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search