Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Table Prefixing


Recommended Posts

This isn't a new request, obviously...









and many more, I'm sure. So, I'll start by repeating the request to have this officially integrated into the distribution. Sure, it's easy to manually add in, but it's such a trivial programming step and such an unneeded annoyance for users, I don't see any reason to not do it. Also, contributions that add new db tables need prefixing manually added, so there's potential for missed items when upgrading versions of various things over time.


In addition to requesting table prefixing, I would also like to see the database name optionally prefixed to the table name for all db queries. This makes it much easier to run a second MySQL program that is in a different database, such as a hit logger. This is a very common oversight; rarely do programmers take into account how their work will interact with someone else's... But when it's an easy fix and there is no downside, it's worth paying attention to.




define('TABLE_CUSTOMERS', 'osCommerce_customers');


change to:


define('TABLE_CUSTOMERS', DB_DATABASE .'.osCommerce_customers');


I plan on going through the table definitions and trying that out to make sure it doesn't trigger any unexpected glitches...



Link to comment
Share on other sites


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

  • Create New...