Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: phpmyadmin sql to copy table fields?

    You would have to extend the product table to add the new columns, and the extension table would need a unique index in common with the product table (probably products_id). Then you could do something like

    UPDATE products AS p, extension_table AS et
    SET p.column_name_1 = et.column_name_1,
    p.column_name_2 = et.column_name_2,
    ...
    p.column_name_n = et.column_name_n
    WHERE p.products_id = et.products_id;
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  2. #2
    Join Date
    Oct 2008
    Posts
    16
    Plugin Contributions
    0

    Default Re: phpmyadmin sql to copy table fields?

    Many thanks Kuroi that was just what I was after ! Just done a test and seems OK. products_id was the index of course. This was what I used on the copies of the tables

    UPDATE zen_products1 AS p, zen_products_extra_stuff1 AS et
    SET p.products_ref = et.products_ref
    WHERE p.products_id = et.products_id;
    I've eyeballed the result and it looks fine but now I'm going to run do some more checks to makes sure it really is OK before doing the live run.

    Thanks again.


 

 

Similar Threads

  1. v139h Save the Multi Table Query Result in phpmyadmin or by SQL CLI
    By explorer1979 in forum General Questions
    Replies: 2
    Last Post: 31 Dec 2013, 09:03 PM
  2. Copy tax table from SQL database phpMyAdmin
    By giftmeister in forum General Questions
    Replies: 0
    Last Post: 31 Oct 2011, 07:57 PM
  3. Need help w/ SQL query in phpMyAdmin
    By audradh in forum General Questions
    Replies: 17
    Last Post: 16 Nov 2009, 01:05 PM
  4. How to use phpMyAdmin to get a copy of your raw dbase sql
    By schoolboy in forum General Questions
    Replies: 5
    Last Post: 12 Nov 2009, 08:31 AM
  5. Can I Copy Products & Attributes from another site in phpmyadmin?
    By milobloom in forum Upgrading from 1.3.x to 1.3.9
    Replies: 0
    Last Post: 13 May 2007, 06:00 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