title: From MYSQL query to google charts
body: <p>Let me start by saying, i'm not sure how to ask the right question on this, but here goes...</p>
  
  <p>I have a database of amounts that all have times attached to them. for example four rows would look like:</p>
  
  <pre><code>2  | 1000 | 2012-11-01 12:09:09
  2  | 800  | 2012-11-01 12:10:21
  10 | 900  | 2012-11-01 12:11:36
  10 | 750  | 2012-11-01 12:12:46
  </code></pre>
  
  <p>The first column is the user. I am wanting to out put this to a google line graph, but really struggling on how to set-up the query.</p>
  
  <p>The end result in the javascript array needs to looks like:</p>
  
  <pre><code>data.addColumn('string', 'Date');
  data.addColumn('number', 'User 2');
  data.addColumn('number', 'User 10');
  
  data.addRows([
      ['12:09', 1000, null],
      ['12:10', 800, null],
      ['12:11', 800, 900],
      ['12:12', 800, 750]
  ]);
  </code></pre>
  
  <p>Any help or steers more than welcome on this. I'm thinking a few php loop, but a little stuck...</p>