If I were to use a connect() function more than once on a page would the database be connected to each time the function was called or would it know that a connection was already open and just skip that part of the code and continue on with the query?
rgds, Scott d~
Use pconnect instead of connect. Also read the corresponding chapter in a PHP Manual to ensure that pconnect is the exact what your want.
You should only connect once to each resource you need. Place your connects near the top of your code, and you're set.
Multiple connects to the same database just waste time and memory.