First time using Mysqli, how to check if All connections are properly closed? -


is there way test if connections closed?
help! :)

  <?php     $con=mysqli_connect("localhost","myuse","mypass","myss");      // check connection     if (mysqli_connect_errno()) {       echo "failed connect mysql: " . mysqli_connect_error();     }      $user = $_post['user']; $http = $_post['pass'];        $results = mysqli_query($con, "select * siri");              if(mysqli_num_rows($results) > 0)         {           }         else         {            mysqli_query($con,"insert taible(user,http) values('$user', '$http')");         mysqli_query($con,"insert mainble(user,http) values('$user', '$http')");          }       mysqli_close($con);     ?> 

am required close $results ? help!

you have 1 connection.
don't have check if closed.
aren't required close $results either.

what should real concern instead use of prepared statements.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -