Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Database Table Prefix & Mods

    Can anyone tell me if I install a database patch using the admin install patches function if this automatically sets the database table prefix?

    I have a client that has zen_ prefix and not sure if I have to amend the modules sql patch file and add the prefix to all the tables referenced in the file?

    Thanks in advance.

    Phil
    Phil Rogers
    A problem shared is a problem solved.

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: Database Table Prefix & Mods

    Not in my experience, no. You have to edit the SQL in the patch to add the prefix.

  3. #3
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: Database Table Prefix & Mods

    Quote Originally Posted by stevesh View Post
    Not in my experience, no. You have to edit the SQL in the patch to add the prefix.
    Cheers mate :o)

    I'll add one of the sections with the added prefix and see what happens, I can alway delet if I end up with zen_zen_ I guess.

    Thanks for your reply
    Phil Rogers
    A problem shared is a problem solved.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Database Table Prefix & Mods

    Yes, the Zen Cart admin Install SQL Patch tool does automatically insert the DB_PREFIX value correctly in simple SQL statements. Complex joins need to be rewritten to put join syntax on new lines so the parser can insert the prefix properly on joined table names. There are many examples of these in the upgrade .sql files in the zc_install/sql/ folder if you need such to follow.
    .

    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.

  5. #5
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: Database Table Prefix & Mods

    Quote Originally Posted by DrByte View Post
    Yes, the Zen Cart admin Install SQL Patch tool does automatically insert the DB_PREFIX value correctly in simple SQL statements. Complex joins need to be rewritten to put join syntax on new lines so the parser can insert the prefix properly on joined table names. There are many examples of these in the upgrade .sql files in the zc_install/sql/ folder if you need such to follow.
    Cheers Doc, yeah worked fine. was scary though!

    Thanks for letting me know
    Phil Rogers
    A problem shared is a problem solved.

 

 

Similar Threads

  1. v154 Table Prefix
    By jolliejollie in forum Installing on a Windows Server
    Replies: 3
    Last Post: 27 Apr 2015, 01:52 AM
  2. v139h Database table prefix not recognized when establishing product restriction in coupons
    By ronlee67 in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 5
    Last Post: 18 Mar 2013, 10:58 PM
  3. Changing Table Prefix's
    By brimsjewelry in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 30 Nov 2006, 09:54 AM

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