title: MySQL multiple prepared statements with same connection
body: <p>What exactly are the rules for setting up multiple prepared statements simultaneously (with a single DB connection)? I often have loops that include multiple queries; it would be nice to set up 3 prepared statements, cycle through them, then close them all.</p>
  
  <p>What I've found is that sometimes they work together, sometimes they don't. For instance I've been able to set up 3 simultaneous SELECT statements. But I <em>think</em> that having a prepared SELECT and an INSERT on the same table, running in a loop, disconnects me from the database (or at least it doesn't work as it should).
  However, when I change the prepared statements to regular queries, I can run the same queries in the same order, just fine.</p>
  
  <p>I'm pretty much a novice and would appreciate some clarification on how this works! </p>