title: sorting data by date and forming graph(date vs no of occur) like google webmaster
body: <p>my mysql table stores the date and id of the particular product
  when a users access that product in mysql table it is written and it stores the details.the table structure is</p>
  
  <p>id is auto-increment .product id is id of product not unique it can appear several times and time is time stamp that product was accessed by users</p>
  
  <pre><code>id         productid        time
  1           33               3443434333
  2            444             334344444
  3            44               445435434
  </code></pre>
  
  <p>i want to sort out the result for any productid datewise. suppose productid 33 was accessed 1000 times in one month then i want to plot a graph datewise just like google webmaster where it shows 30 days details .for example in 1.08.12 view 30 times , 2.08.12 view 50 times etc. </p>
  
  <p>which query and graph i should use so that i can show the details just like google webmaster</p>