CLOSE MYSQL SESSION

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Carlos Marangon

    #1

    CLOSE MYSQL SESSION

    hello!

    My server provides me 15 simultaneous connections to MySQL.
    What is the comand to close the sessions ?


    Carlos
  • Chris Hope

    #2
    Re: CLOSE MYSQL SESSION

    Carlos Marangon wrote:
    [color=blue]
    > My server provides me 15 simultaneous connections to MySQL.
    > What is the comand to close the sessions ?[/color]

    Assuming you aren't using persistant connections your connection will close
    when the script terminates. It's always good programming practice to
    explicitly close the connection regardless; the mysql_close() function does
    this.

    I suggest reading the MySQL section of the PHP manual which can be found at:


    --
    Chris Hope
    The Electric Toolbox - http://www.electrictoolbox.com/

    Comment

    • Jan Pieter Kunst

      #3
      Re: CLOSE MYSQL SESSION

      In article <1083309774_129 90@news.athenan ews.com>,
      Chris Hope <chris@electric toolbox.com> wrote:
      [color=blue][color=green]
      > > My server provides me 15 simultaneous connections to MySQL.
      > > What is the comand to close the sessions ?[/color]
      >
      > Assuming you aren't using persistant connections your connection will close
      > when the script terminates. It's always good programming practice to
      > explicitly close the connection regardless; the mysql_close() function does
      > this.[/color]

      But note this, from <http://nl.php.net/mysql_close>:

      mysql_close() will not close persistent links created by
      mysql_pconnect( ).

      JP

      --
      Sorry, <devnull@cauce. org> is een "spam trap".
      E-mail adres is <jpk"at"akamail .com>, waarbij "at" = @.

      Comment

      Working...