title: Mysql - store a count using a column
body: <p>I might have missed something about MySQL.</p>
  
  <p>I'm trying to find a way to store a "count" in a column.
  It has to be dynamically updated without any manual update.</p>
  
  <p>I don't want to add or remove 1 to the count any time the member creates or delete a content. The field in contentcount must automatically be a count of every content owned by this member.</p>
  
  <pre><code>create table content
  (
     id_content           int not null auto_increment,
     id_member            int not null,
     primary key (id_content)
  );
  
  create table member
  (
     id_member            int not null auto_increment,
     contentcount         ???????????????,
     primary key (id_member)
  );
  
  alter table content add constraint fk_member_content foreign key (id_member)
        references member (id_member) on delete cascade on update cascade;
  </code></pre>
  
  <p>How can I achieve this ?
  Thank you for any help.</p>