title: jquery ajax passing sql query
body: <p>I'm using an ajax call to query a database.  I'd like to pass a complex sql query as part of the ajax data. Is this the way I should be doing it?</p>
  
  <pre><code>var myQuery = 'select * from table....';        
  
  $.ajax({
      type: "GET",
      url: 'jsonQuery.php',
      dataType: 'json',
      data: {keyvalue: 2416, q: myQuery},
      success: function(pieData) {
          //do something with the response        
      }
  
  });
  </code></pre>