title: Running queries once only
body: <p>I have an application which contains 2 buttons.</p>
  
  <p>Button 1 gives the result by this query:</p>
  
  <pre><code>select * from tbl1;
  </code></pre>
  
  <p>Button 2 gives the result by this queries:</p>
  
  <pre><code>select * from tbl1;
  select * from tbl2;
  </code></pre>
  
  <p>So what's happening is that I have to run <code>select * from tbl1</code> twice, Once for button 1 and once again for button 2.</p>
  
  <p>Is it possible to run both queries once when button 1 is clicked, but only show the results from <code>tbl1</code>, and then show the results from <code>tbl2</code> when button 2 is clicked?</p>