#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    59
    Rep Power
    2

    Close Database connection


    Dear Friends,

    Is it necessary to close database connection in mysqli?

    If it is necessary, which function will be use
    "$mysqli->close();
    $mysqli->kill($thread);" ?



    Thanks
    Sarath_PHP
  2. #2
  3. Code Monkey V. 0.9
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Mar 2005
    Location
    A Land Down Under
    Posts
    2,066
    Rep Power
    1990
    You just need to read the manual . The first of the user notes there explains it all with an excerpt taken from the Zend website.

    The basics are... You don't have to because all connections are automatically closed at the end of a scripts execution, but you can close them yourself to free up resources if required.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    59
    Rep Power
    2
    Originally Posted by Catacaustic
    You just need to read the manual . The first of the user notes there explains it all with an excerpt taken from the Zend website.

    The basics are... You don't have to because all connections are automatically closed at the end of a scripts execution, but you can close them yourself to free up resources if required.

    Thanks

IMN logo majestic logo threadwatch logo seochat tools logo