peter escribió:
After i invoke mysql_close in a function, then i try to call " $DB-
>query("SELECT * FROM medewerker");" outside that function, it got
error. why?
From PHP manual:
"mysql_query() 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_close() 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
--