This is probably a really newbie question, but I can't search tek-tips at the moment, so I am going to have to post it.
I am writing a script where I establish a connection to a mysql db server within the main body of my script. Later I call a homemade function that runs a query via the already established connection.
I know that if I run mysql_query in the main body of the script it will use the last created connection by default, but I am wondering how the scope issues involved with a function will affect mysql_query e.g. if I call mysql_query within the homemade function, will I need to include a reference to the resource identifier of the previously established mysql connection, or will PHP be able to identify it on its own?
Tx
RD
I am writing a script where I establish a connection to a mysql db server within the main body of my script. Later I call a homemade function that runs a query via the already established connection.
I know that if I run mysql_query in the main body of the script it will use the last created connection by default, but I am wondering how the scope issues involved with a function will affect mysql_query e.g. if I call mysql_query within the homemade function, will I need to include a reference to the resource identifier of the previously established mysql connection, or will PHP be able to identify it on its own?
Tx
RD