title: Counter for unique profile views
body: <p>So im trying to make unique profile views, i thought of creating 2 tables in MySQL:</p>
  
  <ul>
  <li><code>pages (id, profile_id, user_id, date)</code></li>
  <li><code>profile_views (id, profile_id, user_id, count)</code></li>
  </ul>
  
  <p>So when a user goes to a profile it will insert a new record into <code>profile_vies</code> with my <code>user_id</code> and increase the counter. Also it will insert a record in the <code>pages</code> table with my data.</p>
  
  <p>The increment will start if no record of my ID and the <code>profile_id</code> is set inside the pages table within 24 hours, because every 24 hours all queries &lt; 24 hours will be deleted so new counts will take place.</p>
  
  <p>I would like your opinion on this theory on profile views... without using textfiles with IPs stored, or please if you can tell me any better thoughts on how to achieve this.</p>