View Full Version : can one SQL database be used for multiple tasks?
ie: both OS commerce and MovableType (weblog)
and even more... if I was already using it for that... and wanted to use it for some random project (want to learn PHP/MySQL, but haven't got around to it)... would I be able to use the one database for a 3rd use?
You can as long as your tables have different names
Originally posted by HalfaBee
You can as long as your tables have different names This is why most CMSs have a "$dbprefix" or "$tableprefix" or similar configuration variable - whatever it is, it will be prepended to all table names in database operations. It's a fair bet that OS commerce and MovableType are similarly configurable.
I have phpbb and movable type running off of 1 database currently.
to keep things neat.. make sure to keep the tables named with a prefix.
example:
with phpbb the default is - phpbb_
with movable type the default is - mt_
the only problem I could see running into is if you try to install two copies of movable type and don't change the table prefix on the 2nd copy and over wrote the existing tables.
on that note make sure to make backups in case ;)
*edit* ok I guess Im just slow :p I typed this up when there weren't any responses..lol
oscommerce doesn't have prefixes OOTB, but it's easy to make the prefixes. I have two stores running on the same DB, one has prefixes and the other one doesn't
vBulletin v3.6.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.