title: PHP SQL Query inside another Query's fetch() statement
body: <p>This didn't return any helpful google results, so I'll just ask it here:</p>
  
  <p>Is it possible in PHP to start another query inside another query's fetch statement after executing() the first query?</p>
  
  <p>e.g.</p>
  
  <pre><code>if ($stmt=mysqli-&gt;prepare(query)) {
      $stmt-&gt;bind_param('s', $variable);
      $stmt-&gt;execute();
      $stmt-&gt;store_result();
      while ($stmt-&gt;fetch()) {
           if ($stmt2=mysqli-&gt;prepare(query2)) {
                $stmt2-&gt;bind_param('s', $othervariable);
                $stmt2-&gt;execute();
                $stmt2-&gt;store_result();
                while ($stmt2-&gt;fetch()) {
                    store result or something
                }
           }
      }
  }
  </code></pre>