Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to deal with same table names and one dbase name?


procele

Recommended Posts

Posted

:lol: Hi everybody.

 

My provider gives me just one name for the whole mySQL data base.

 

It means that I have to put all the tables, from different programs, below the same dbase name.

 

Some programs use a prefix on the tables to bypass this problem.

 

Oscommerce does not use this pattern. Is there a place in some script where I can change all the tables names to bypass this limitation?

 

Thanks in advance.

Best regards,

Salvador Agati

Posted

Edit both of your includes/application_top.php file to add a prefix to the table names.

 

Then dump your database to an .sql file and add the prefix to the table names there. Drop your database, recreate it, and import the updated .sql file.

 

That should have you going.

 

As an aside, you should consider switching to another host that allows you to have more databases.

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Posted

In case you have not started with installation yet, edit CREATE TABLE statements in oscommerce.sql in install folder.

 

Thanks

Posted

I had to change line 122 in catalog/install/includes/functions/database.php.

 

I did that after doing what Daemonj and Michael suggested and it worked fine!

 

Thanks to them, again.

Regards,

Salvador

Archived

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

×
×
  • Create New...