tags:

views:

46

answers:

1

I do have single database and near about 11 tables. while my web page is opening informations from these 11 tables will be accessed same time. according to my current settings what I did now is for each table database is opening and closing. say I had given username and password to open databse for each table and close after retrieving information from that table.

Is this the right way to do it?? I feel because of this the database is opeing and closing 11 times!!!! Am I right?? is this the right way to do that??

Oh well I do have some tables which update date is differ from others... THanks

Mathew

+1  A: 

Since the tables are in the same database, it's not necessary to keep closing and re-opening the database. Use mysql_connect the first time, and then subsequent calls to e.g. mysql_query will reutilize that same connection, if you don't provide a new one.

Greg Harman