mysql_close and $DB->query problem

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

    mysql_close and $DB->query problem

    Hi
    After i invoke mysql_close in a function, then i try to call " $DB-
    >query("SELEC T * FROM medewerker");" outside that function, it got
    error. why?
    thanks
    from Peter (cmk128@hotmail .com)
  • Mitch Sherman

    #2
    Re: mysql_close and $DB->query problem

    On Tue, 13 May 2008 23:28:39 -0700 (PDT), peter <cmk128@hotmail .com>
    wrote:
    >Hi
    After i invoke mysql_close in a function, then i try to call " $DB-
    >>query("SELE CT * FROM medewerker");" outside that function, it got
    >error. why?
    >thanks
    >from Peter (cmk128@hotmail .com)
    Reconnect to the database if you closed the connection using
    mysql_close.

    Mitch

    Comment

    • =?ISO-8859-1?Q?=22=C1lvaro_G=2E_Vicario=22?=

      #3
      Re: mysql_close and $DB-&gt;query problem

      peter escribió:
      After i invoke mysql_close in a function, then i try to call " $DB-
      >query("SELEC T * FROM medewerker");" outside that function, it got
      error. why?
      From PHP manual:

      "mysql_quer y() sends an unique query (multiple queries are not
      supported) to the currently active database on the server that's
      associated with the specified link_identifier . [...] If the link
      identifier is not specified, the last link opened by mysql_connect() is
      assumed."

      "mysql_clos e() closes the non-persistent connection to the MySQL server
      that's associated with the specified link identifier. If link_identifier
      isn't specified, the last opened link is used."

      If you don't specify a link it's very likely that you only use one
      connection in your whole script.


      --
      -- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
      -- Mi sitio sobre programación web: http://bits.demogracia.com
      -- Mi web de humor al baño María: http://www.demogracia.com
      --

      Comment

      Working...