Re: More include issues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dan Shirah wrote:
I thought that if you made a connection at the beginning of a page, that you could use that connection throughout the page without having to type it over again as long as you did not explicitly put in code to close the connection?? Which is why I only inserted the include fil at the beginning of the page. Instead of having: $connection = mssql_pconnect('SERVER','user','password') or die ('server connection failed'); $database = mssql_select_db("database", $connection) or die ('DB selection failed'); in my include file, I should only have $connection instead and then specify $database before the query to the database. Does that sound like the correct solution?

The way you have it at the moment should work fine. Might I suggest you try using a non-persistant connection? I've heard things in the past that the persistant connection implementation in the MSSQL extension can be a bit flakey.

-Stut

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux