Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Need help with tep_db_connect() and tep_db_close()


Guest

Recommended Posts

I want to be able to have oscommerce use mutiple database but i'm a little worried about using tep_db_connect() and tep_db_close(). I know when you want to use another database you have to call tep_db_close() to close the default database and then you have to call tep_db_connect(,,,new_database) to connect to the new database. If there are a lot of user on my webpage going to different pages won't there eventually be a clash between the right database to use? For exampe:

 

User A clicks on the index.php page which calls tep_db_connect() for the default database and almost at the same time user B clicks on product_listing.php (which uses a different database) that calls tep_db_close(). Won't this affect User A in the sense they won't be able to access the default database? Any help will be greatly appreciated. Thank you.

Link to comment
Share on other sites

have a look in this contribution file: phpbb_forum_external.php It shows a possible way to connect/disconnect to a 2nd dbase.

 

http://www.oscommerce.com/community/contributions,3600

 

 

Thank you for this link it does help but it doesn't really answer my question. It opens and closes the default db and I just wanted to know will this effect a user if they are trying to pull data from the default db? thank you.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...