title: When should I use mysqli_kill() and mysqli_close()?
body: <p>I have my own database which I'm running using Xampp. I'm using the Apache and MySql services on it, though I given public access just yet. I would like to know the proper way to end a bunch of sql queries. I'm using ajax to send data to a php page and query some data from a server. During the ajax requests the I programmed the handler php page so it will be performing multiple queries (at least more than one) to get the specific data I need. Now, I don't know when in the process I should use <code>mysqli_kill()</code> or <code>mysqli_close()</code>. I have it set up right now so only after all the immediate queries for that particular ajax request have been performed, then run mysqli_close(). I don't even use mysqli_kill(). I don't know too much about database connections or managing performance on a server so I don't know <strong>how</strong> to consider this. On one hand, I don't need to close the connection until that user logs off the webpage, right? Or should I just open and close each connection as it comes and is processed?</p>
  
  <p>This handler php page processes requests from a few webpages I have and in one of the webpages there is an input box that sends ajax requests every keystroke to show hints (possible matches)... also note this is an employee access only page so connections shouldn't be too high. </p>
  
  <p>I also took a look at this post <a href="https://stackoverflow.com/questions/4506632/could-someone-explain-a-little-about-this-statement-about-mysqli-close-function">Could someone explain a little about this statement about mysqli close function?</a></p>
  
  <p>The answer is contradictory to the suggestion taken from the php manual website. Would someone please clarify when to use <code>mysqli_kill()</code> and <code>mysqli_close()</code> as well if, for the circumstances I described, there would be any reason to keep a connection alive for the sake of performance?</p>