Hi!

Up until now I always opened a db connection to MySQL, did my query stuff and then closed the connection again, went on to the next script, opened the db connection, did some more queries, closed the connection, went to next script.....

Is there anything speaking against making the db link pointer to be global, call the connection script once right at the start of the set of scripts and then assume that it is just there?

Or asking differently, is there anything speaking against opening and closing the db connection each time a set of queries is to be executed?

I just wonder if I make poor PHP / MySQL work harder than necessary.

David
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to