Originally Posted by
lat9
The default Zen Cart database prefix is '' (i.e. none) and the default WordPress prefix is 'wp_'. As long as the prefixes are different, you should be good-to-go!
Because there are still a few errant WordPress plugins which do not inheirit/use the wp_ table prefix, I ALWAYS include a table prefix in all of my Zen Cart installs to be SUPER SURE that the two are distinguishable.. I do realize that this is simply me being SUPER PARANOID..
Changing the table prefix for the Zen Cart tables is pretty easy, but NOT REQUIRED. For anyone who has already installed Zen Cart without a table prefix, there is a very SIMPLE script you can run to add a table prefix to one's Zen Cart install.
Code:
SELECT Concat('ALTER TABLE ', TABLE_NAME, ' RENAME TO my_prefix_', TABLE_NAME, ';') FROM information_schema.tables WHERE table_schema = 'my_database'
Your result set will be a bunch of queries that you can copy and paste into your favorite MySQL editor (phpMyAdmin, whatever). Just paste those in and execute, and you're all done.
Once the script its run, an update to the store and admin configure.php files to include the new table prefix is all that's needed..
Bookmarks