title: should I close mysql_connection after every query in php cli?
body: <p>I wrote a php cli script to be as an little online game host.(Yes I know it's weird.)</p>
  
  <p>Mysql query is often used in this script. I'm afraid the connection will hold resource, so every time I need run a query, I write code like this:</p>
  
  <pre><code>    $con = mysql_connect("localhost","xxx","xxx");
      mysql_select_db("xxx",$con);
      mysql_query($sql)
      $con = null;
  </code></pre>
  
  <p>It's really frustrating when there's a lot of it. #_#</p>
  
  <p>My question is should I use only one connection, and use it everywhere in the script, and set it null when exit? I think there should be some connection pool with Zend engine.</p>
  
  <p>PS.
   Each script's in charge of one play room, so there may up to 100 at a time, and echo may last for 24 hour.</p>
  
  <p>Thank you for the help!</p>