Results 1 to 7 of 7
  1. #1
    Join Date
    Apr 2007
    Posts
    23
    Plugin Contributions
    0

    Default Remove prefixes from tables

    How does one remove the prefixes from the tables in a MYSQL database? I have phpMyAdmin if that makes a difference.

    All of mine have the prefix "zen_". When doing an upgrade of the database, I deleted this prefix in the box asking me what I'd like to change the prefix to, but the upgrade left it the same.

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Remove prefixes from tables

    Very carefully - - always make a backup to revert back to first....

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

    Default Re: Remove prefixes from tables

    It won't do the rename if your configure.php files aren't writable.
    .

    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.

  4. #4
    Join Date
    Apr 2007
    Posts
    23
    Plugin Contributions
    0

    Default Re: Remove prefixes from tables

    Thanks. When I do the final upgrade & reinstall, I'll remember to change the permissions for that step. Right now I'm just testing and trying to learn my way around everything. I have several copies of everything and appreciate all the cautions to backup-backup-backup. :)

    I found directions for renaming the tables within PHPMyAdmin: https://support.lunarpages.com/knowl...es/article/289 which solves my current problem in working with this particular database. Guess I have to do this one by one.

  5. #5
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,838
    Plugin Contributions
    31

    Default Re: Remove prefixes from tables

    Hi Debra,
    today I spent a really stupid amount of time cutting and pasting between various programs to get the complete table list out of phpmyadmin and into the text sql format below which I used to change the table prefixes on a couple of databases.
    If you do a find-and-replace to change these prefixes to the ones you want and then paste it into the SQL query for the database in phpmyadmin it will do all the tables at once. It does give an error at the end, don't know why, but it does work.
    Regards
    Steve
    ps this is the table list (95) for a standard install, you may have other tables from contributions.

    Code:
    RENAME TABLE zen_address_book to zen138a_address_book,
    zen_address_format to zen138a_address_format,
    zen_admin to zen138a_admin,
    zen_admin_activity_log to zen138a_admin_activity_log,
    zen_authorizenet to zen138a_authorizenet,
    zen_banners to zen138a_banners,
    zen_banners_history to zen138a_banners_history,
    zen_categories to zen138a_categories,
    zen_categories_description to zen138a_categories_description,
    zen_configuration to zen138a_configuration,
    zen_configuration_group to zen138a_configuration_group,
    zen_counter to zen138a_counter,
    zen_counter_history to zen138a_counter_history,
    zen_countries to zen138a_countries,
    zen_coupons to zen138a_coupons,
    zen_coupons_description to zen138a_coupons_description,
    zen_coupon_email_track to zen138a_coupon_email_track,
    zen_coupon_gv_customer to zen138a_coupon_gv_customer,
    zen_coupon_gv_queue to zen138a_coupon_gv_queue,
    zen_coupon_redeem_track to zen138a_coupon_redeem_track,
    zen_coupon_restrict to zen138a_coupon_restrict,
    zen_currencies to zen138a_currencies,
    zen_customers to zen138a_customers,
    zen_customers_basket to zen138a_customers_basket,
    zen_customers_basket_attributes to zen138a_customers_basket_attributes,
    zen_customers_info to zen138a_customers_info,
    zen_customers_wishlist to zen138a_customers_wishlist,
    zen_db_cache to zen138a_db_cache,
    zen_email_archive to zen138a_email_archive,
    zen_ezpages to zen138a_ezpages,
    zen_featured to zen138a_featured,
    zen_files_uploaded to zen138a_files_uploaded,
    zen_geo_zones to zen138a_geo_zones,
    zen_get_terms_to_filter to zen138a_get_terms_to_filter,
    zen_group_pricing to zen138a_group_pricing,
    zen_languages to zen138a_languages,
    zen_layout_boxes to zen138a_layout_boxes,
    zen_manufacturers to zen138a_manufacturers,
    zen_manufacturers_info to zen138a_manufacturers_info,
    zen_media_clips to zen138a_media_clips,
    zen_media_manager to zen138a_media_manager,
    zen_media_to_products to zen138a_media_to_products,
    zen_media_types to zen138a_media_types,
    zen_meta_tags_categories_description to zen138a_meta_tags_categories_description,
    zen_meta_tags_products_description to zen138a_meta_tags_products_description,
    zen_music_genre to zen138a_music_genre,
    zen_newsletters to zen138a_newsletters,
    zen_nochex_apc_transactions to zen138a_nochex_apc_transactions,
    zen_nochex_sessions to zen138a_nochex_sessions,
    zen_orders to zen138a_orders,
    zen_orders_products to zen138a_orders_products,
    zen_orders_products_attributes to zen138a_orders_products_attributes,
    zen_orders_products_download to zen138a_orders_products_download,
    zen_orders_status to zen138a_orders_status,
    zen_orders_status_history to zen138a_orders_status_history,
    zen_orders_total to zen138a_orders_total,
    zen_paypal to zen138a_paypal,
    zen_paypal_payment_status to zen138a_paypal_payment_status,
    zen_paypal_payment_status_history to zen138a_paypal_payment_status_history,
    zen_paypal_session to zen138a_paypal_session,
    zen_paypal_testing to zen138a_paypal_testing,
    zen_products to zen138a_products,
    zen_products_attributes to zen138a_products_attributes,
    zen_products_attributes_download to zen138a_products_attributes_download,
    zen_products_description to zen138a_products_description,
    zen_products_discount_quantity to zen138a_products_discount_quantity,
    zen_products_notifications to zen138a_products_notifications,
    zen_products_options to zen138a_products_options,
    zen_products_options_types to zen138a_products_options_types,
    zen_products_options_values to zen138a_products_options_values,
    zen_products_options_values_to_products_options to zen138a_products_options_values_to_products_options,
    zen_products_to_categories to zen138a_products_to_categories,
    zen_product_music_extra to zen138a_product_music_extra,
    zen_product_types to zen138a_product_types,
    zen_product_types_to_category to zen138a_product_types_to_category,
    zen_product_type_layout to zen138a_product_type_layout,
    zen_project_version to zen138a_project_version,
    zen_project_version_history to zen138a_project_version_history,
    zen_query_builder to zen138a_query_builder,
    zen_record_artists to zen138a_record_artists,
    zen_record_artists_info to zen138a_record_artists_info,
    zen_record_company to zen138a_record_company,
    zen_record_company_info to zen138a_record_company_info,
    zen_reviews to zen138a_reviews,
    zen_reviews_description to zen138a_reviews_description,
    zen_salemaker_sales to zen138a_salemaker_sales,
    zen_sessions to zen138a_sessions,
    zen_specials to zen138a_specials,
    zen_tax_class to zen138a_tax_class,
    zen_tax_rates to zen138a_tax_rates,
    zen_template_select to zen138a_template_select,
    zen_upgrade_exceptions to zen138a_upgrade_exceptions,
    zen_whos_online to zen138a_whos_online,
    zen_zones to zen138a_zones,
    zen_zones_to_geo_zones to zen138a_zones_to_geo_zones;

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

    Default Re: Remove prefixes from tables

    Using zc_install to do the rename takes only a couple minutes. There's no need to be doing an actual version-upgrade to just do a rename.
    .

    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.

  7. #7
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,838
    Plugin Contributions
    31

    Default Re: Remove prefixes from tables

    Hi,
    I dont understand about zc_install renaming tables.
    I thought it just created the necessary tables in the specified database. How does it rename what is already there?
    thanks
    Steve

    Edit: B****cks: the info is here: http://www.zen-cart.com/forum/showthread.php?t=50108
    Last edited by torvista; 1 Oct 2008 at 05:38 AM.

 

 

Similar Threads

  1. v151 How can I remove all these tables from my product descriptions?
    By DannyVarley in forum General Questions
    Replies: 2
    Last Post: 12 Jul 2013, 02:38 PM
  2. can I remove zen_ prefix from all tables?
    By warroyo90 in forum General Questions
    Replies: 7
    Last Post: 27 Jul 2012, 09:24 PM
  3. Faster way to remove tables in phpMyAdmin?
    By greenenergies in forum General Questions
    Replies: 1
    Last Post: 30 Sep 2010, 06:51 PM
  4. Problem during upgrade (after renaming tables to remove zen_ prefix)
    By rainthebat in forum Upgrading from 1.3.x to 1.3.9
    Replies: 5
    Last Post: 11 Dec 2007, 05:23 PM
  5. Convert db tables from Oscommerce
    By HDG in forum General Questions
    Replies: 3
    Last Post: 30 Jul 2007, 08:55 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