Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Database tables names...?


ActiveTuning

Recommended Posts

My host won't allow me to create more than one database, and I need to create another OSC store on my server, but cannot overwrite the tables as the current store is live.

 

What's the best/easiest way to setup OSC to create the tables in the database with a prefix before each table like OSCcustomers, OSCproducts, etc, etc....so that everything has like OSC before it, that way I can seperate it from the current store.

 

Thanks in advance.

Link to comment
Share on other sites

Anything is possible with time and patience.

 

I've never tried it, but you would need to change the oscommercelsql file that creates the tables, and change the definitions of the table name defines. I belive the table name defines are confined to the /catalog/includes/application_top.php and /admin/includes/application_top.php files, but I'm not 100% certain.

Link to comment
Share on other sites

You could build the second store with all the databases defiined with a prefix or suffix on them, then define the new database names in application_top.php so it knows what databases to pull all the information from in the second store.

 

So, if you were to name your products table products_b you would change the definition in application_top.php to:

 

  define('TABLE_PRODUCTS', 'products_b');

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...