Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Table name conflict


fatlizard

Recommended Posts

First, let me say I was blown away when I installed 2.1 and everything ran like a dream.

 

Trouble is, my help desk/ticketing system uses a table named 'configuration'.

 

First, I dropped the plain-vanilla osC database.

 

(All this is on a local server for testing etc., so no damage done, and all source backed up etc)

 

I then edited the osC SQL file, renaming every table with the prefix oscom_

Next I went through the source files to locate the all SQL statements (SELECT, INSERT etc) and changed the table names to my prefixed tables.

 

I also left the qualified table references as they were, with just the prefix added, ie., customer.customer_id -> oscom_customer.customer_id

 

I'm sure I got them all, but osC died an ugly death.

 

Went through the source files again, nope, couldn't find any table reference I'd missed.

 

Anyone else managed to change the table names successfully, or have any tips/tricks to manage this?

 

(Perhaps the development team could also make a note of this for their ever growing 'to do' list?)

 

Cheers

Link to comment
Share on other sites

My suggestion: Use a 2.2-CVS snapshot. In 2.2-CVS you can edit table names in the file catalog/includes/application_top.php.

 

HTH

You can't have everything. That's why trains have difficulty crossing oceans, and hippos did not adapt to fly. -- from the OpenBSD mailinglist.

Link to comment
Share on other sites

Yikes, what a fast response! Thank you!

 

I did read many posts recommending 2.2

 

Yesterday I downloaded it, installed it this morning, but it died with the error Warning: mt_rand(): Invalid range: 0..0

 

I've also just seen your reply to the message relating to that issue.

Seems I missed the update by one day.

 

Also read the minor manual mod. that will fix this, so will try 2.2 again.

 

Thanks again

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...