Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Dec 2006
    Posts
    46
    Plugin Contributions
    0

    Default My database is all wrong!

    When I installed Zen Cart I selected the option that adds text_ before the name of the database (or so I thought). Well as I'm working on my site I happen to look in phpMyAdmin and noticed that all the tables were created with text_ and also duplicated without text_ for a total of 186 tables!!

    My web host doesn't require the text_ before the tables, only before the database name which actually would be the first 8 characters of my username. I think I misunderstood when I installed ZC and read it as before the database name.
    Anyhow, now unfortunately for me those are the tables where all my data is being stored

    I need to somehow delete the appended tables (but first transfer the data), and remove the instruction to add all future data to text_ tables?
    Any suggestions on the best (and painless) way to do this?

    thanks

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: My database is all wrong!

    Let's chat first ...

    Why do you think you need a prefix, as in the text_ in your table names?

    I am assuming at this moment the text_blah tables are the not upgraded version of your blah tables which is your real data that just hasn't been upgraded yet, correct?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Dec 2006
    Posts
    46
    Plugin Contributions
    0

    Default Re: My database is all wrong!

    Hi...

    I found out that I did mis-read the instructions when setting up Zen Cart. I just looked again in the install process and this is where I screwed up:

    What is the prefix you would like used for database tables? Example: zen_ Leave empty if no prefix is needed.
    You can use prefixes to allow more than one store to share the same database.
    I read it as the database gets it which would make sense since my host appends my username to my databases.

    So I guess I need to somehow surgically remove the data from these tables and reinstall the database without the prefix and reapply all my data.

    My database is the latest version that was installed (not an upgrade).

    I hope all this makes sense

    thanks

  4. #4
    Join Date
    Dec 2006
    Posts
    46
    Plugin Contributions
    0

    Default Re: My database is all wrong!

    Just to add, the file I used when I installed was this one:

    mysql_zencart.sql 4795 2006-10-20

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: My database is all wrong!

    Zen Cart has an automatice Installer and Upgrader in /zc_install

    You should be using that vs trying to figure out on your own how to upgrade the database ...

    Does your old version have Products and Categories and Orders etc. in it?

    If you want to remove all the tables that start with text_ you could go to phpMyAdmin and check the checkbox next to each table that starts with text_ and then select Drop Tables ...

    This will leave you with only the tables that do not have the prefix on them ...

    Before attempting this ... backup ...

    Then make sure the 2 configure.php files do not have the prefix defined in them ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  6. #6
    Join Date
    Dec 2006
    Posts
    46
    Plugin Contributions
    0

    Default Re: My database is all wrong!

    What do you mean by upgrading the database? I already have the latest, so there is no need. I don't have an old version like you said, this was a brand new install of Zen Cart and the database. I guess when I created the site it duplicated the tables, one with the prefix and one without.

    Yes, my database has products, pricing, etc etc... in it. That's why I need suggestions on the best way to handle this.
    I guess I'll need to manually (and tediously) copy and paste from the wrong tables to the correct ones, then delete them after. Ughhh...

    So the instruction to place data in the prefixed tables come from the configure.php files? Ok, I will fix it there too so from now on the data is going where it is suppose to.

  7. #7
    Join Date
    Apr 2006
    Location
    West Salem, IL
    Posts
    2,888
    Plugin Contributions
    0

    Default Re: My database is all wrong!

    Does it really matter? If the cart is setup to use the tables with "text_" and not the one without. Just delete the tables without the prefix and use it the way its setup. Who would know but you and the cart fuctions fine either way. why put in all the extra work and stress yourself out.
    Mike
    AEIIA - Zen Cart Certified & PCI Compliant Hosting
    The Zen Cart Forum...Better than a monitor covered with post-it notes!

  8. #8
    Join Date
    Dec 2006
    Posts
    46
    Plugin Contributions
    0

    Default Re: My database is all wrong!

    Ya know I didn't even give that much thought, and it even makes sense.

  9. #9
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: My database is all wrong!

    If you wish to rename your tables, you can use the installer to do that too. ... mark your configure.php files as writable, upload the zc_install folder, choose Database Upgrade (NOT "Install"), and you'll notice the option fields for renaming tables located at the bottom of the upgrade-versions listing. Remember to mark your configure.php files read-only again when done.
    .

    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.

  10. #10
    Join Date
    Apr 2006
    Location
    West Salem, IL
    Posts
    2,888
    Plugin Contributions
    0

    Default Re: My database is all wrong!

    huh, even I didn't realize it was that simple......
    Mike
    AEIIA - Zen Cart Certified & PCI Compliant Hosting
    The Zen Cart Forum...Better than a monitor covered with post-it notes!

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 Server/database time zone correct in admin wrong in database
    By badarac in forum General Questions
    Replies: 10
    Last Post: 30 Sep 2015, 08:10 PM
  2. Imported database site gone wrong :(
    By pb4 in forum General Questions
    Replies: 11
    Last Post: 19 May 2010, 11:23 AM
  3. linking to wrong database
    By jenpen in forum Installing on a Linux/Unix Server
    Replies: 4
    Last Post: 13 Mar 2009, 03:57 AM
  4. Cart pointing to wrong database
    By sassayone in forum Basic Configuration
    Replies: 3
    Last Post: 22 Jun 2007, 09:06 PM
  5. Database, am I doing this wrong?
    By mimimai in forum Installing on a Windows Server
    Replies: 3
    Last Post: 23 May 2006, 06:37 PM

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