title: events from db by given month and year, or other suggestion
body: <p>With jQuery's $.post i want to send a value to my php function , where inside it should lookup the events by it's current selected month.</p>
  
  <p>Now there some programmatic problems.</p>
  
  <p>First is to what value it is best to make the check against.
  In theory i have all available, but the ideas i have all seem to be clumsy.
  If it helps ,  i use the following script that does all the calculation with the data i provide it with. <a href="http://www.vissit.com/projects/eventCalendar/" rel="nofollow">eventCalendar</a> </p>
  
  <p>For my testing purposes , just to make a check if the event is active or not i use the following code:</p>
  
  <pre><code>var Calendar = new Object();
  Calendar.id = '1';//Check if active 1 or 0
  
  var calendarJson = JSON.stringify(Calendar);                
  $('#indicator').show();
  
  $.post('Controller.php',
      {
          action: 'get_events',
          calendar: calendarJson          
      },
      function(data, textStatus) {
  ....more code
  </code></pre>
  
  <p>Were the data is retrieved and handled as:</p>
  
  <pre><code>public function getEvents($calendar){               
      $sth = $this-&gt;dbh-&gt;prepare("SELECT * FROM events WHERE current = ?");
      $sth-&gt;execute(array($calendar-&gt;id));
      return json_encode($sth-&gt;fetchAll());
  }
  </code></pre>
  
  <p>Where in the counted result the most important data = <code>event_sdate varchar(255)</code></p>
  
  <p>looks like:</p>
  
  <pre><code>event_sdate = 1394220775280 (milliseconds)
  </code></pre>
  
  <p>However my intention is to let it send back all events by it's given month.
  So i have to replace <code>current = ?</code> with something that is inserted when create a new event.
  And that should, at least it is what i think, the month and year of creation.</p>
  
  <p>And when make the call to the php function:</p>
  
  <pre><code>Calendar.id = '1';//Check if active 1 or 0
  </code></pre>
  
  <p>Should be something like:</p>
  
  <pre><code>Calendar.id = 'March 2014';//Check if current month and year
  </code></pre>
  
  <p>When i load the calendar without any events yet it looks like:</p>
  
  <p><a href="http://jsfiddle.net/whitehat/m8jZM/" rel="nofollow">this jsfiddle</a></p>
  
  <p>I hope someone could point me in the right direction of how to achieve what i try to do </p>