Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2011
    Posts
    4
    Plugin Contributions
    0

    Default Adding prefix to database tables

    Hello.

    I recently installed ZenCart 1.3.9h and have spent a couple days configuring the software. I just realized the table names do not have any prefix and are mixed with other tables I have in the same database.

    I would like to rename all zencart tables by adding a "zen_" prefix to the tables. To that end I have two questions:

    1. What is the proper way to make this change on a clean install so I know next time?

    2. What is the best way to make this change on an existing store that is in development?

  2. #2
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Adding prefix to database tables

    1. When running zc_install, supply the table-prefix in the field that asks for it on the database-settings screen.
    2. Manually rename each table by hand, and then update the DB_PREFIX value in both of your configure.php files.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Aug 2011
    Posts
    4
    Plugin Contributions
    0

    Default Re: Adding prefix to database tables

    thank you for taking the time to share your guidance!

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Adding prefix to database tables

    If you have the ability to create another database (or have one created for you), it would be cleanest to have a db dedicated to Zen Cart. If your hosting plan allows only one db, you will have to use the prefix as described.

 

 

Similar Threads

  1. can I remove zen_ prefix from all tables?
    By warroyo90 in forum General Questions
    Replies: 7
    Last Post: 27 Jul 2012, 09:24 PM
  2. Adding a column to one of the database tables
    By sketchhgal in forum General Questions
    Replies: 15
    Last Post: 10 Jun 2010, 07:53 PM
  3. Create Database, Tables and Drop Database or Tables
    By elwood cordery in forum General Questions
    Replies: 3
    Last Post: 17 Aug 2009, 04:03 PM
  4. Add a prefix to database tables
    By hyperlite635 in forum Installing on a Linux/Unix Server
    Replies: 1
    Last Post: 13 Oct 2007, 10:32 PM
  5. Adding new tables to the database
    By ChrisTenn in forum General Questions
    Replies: 2
    Last Post: 1 Feb 2007, 05:59 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR