Results 1 to 7 of 7

Thread: Custom Fields - import

  1. #1
    Join Date
    May 2004
    Location
    New Zealand
    Posts
    600

    Default Custom Fields - import

    Is there a way to import custom fields,

    I know there is the idx_custom_field but i notice that it also adds rows into the

    idx_link and idx_link_temp

    I know there is a import for category but I cant see one for custom fields...

    Any thoughts?

  2. #2
    Join Date
    Aug 2001
    Location
    Indonesia
    Posts
    3,732

    Default

    The easiest way is using phpmyadmin. Logical step by step as below:

    1) Assume you have custom field ready (create in indexu admin panel). Give one or two sample data with admin panel too.

    2) In phpmyadmin, select idx_link table. Export data only to csv. It will provide you a correct field order. Open with excel or similar software.

    3) With the above sample data, arrange your data to match field order perfectly. Give it a few example, 10 or 20 rows. Then save to csv.

    4) In phpmyadmin, truncate/empty all idx_link data (to prevent duplicate key, unless you have unique link_id). Then import the csv to idx_link table.

    You can also import categories using the same step. Just make sure you know the category_id and parent_id to construct the category structure.

  3. #3
    Join Date
    May 2004
    Location
    New Zealand
    Posts
    600

    Default

    Cheers Dody,

    I dont mean the links custom field data for the links , more just the custom fields itself so more the structure,

    In a previous version i have about 30 custom fields , and im just wanting to bring them across , not the links at all , and wanting to keep the rest of the database in the same format as v2.4

    Just wondering is there a faster way than having to add them one by one through the admin panel

  4. #4
    Join Date
    Aug 2001
    Location
    Indonesia
    Posts
    3,732

    Default

    I see.

    I assume you want to duplicate the structure from one indexu directory to another new directory. Am I correct?

    1) Do fresh install on new directory

    2) With phpmyadmin, export the structure only of the following table from old directory:
    - idx_link
    - idx_link_temp
    - idx_custom_field
    - idx_ default_field

    Add Drop Table if table exist.

    3) Now select the new database used by new directory, then import with the sql file generated from step 2.

    I hope it is clear enough

  5. #5
    Join Date
    May 2004
    Location
    New Zealand
    Posts
    600

    Default

    If there is a a new field in the new database .. will it keep that or will the drop option remove it and just put in the fields from the older database?

  6. #6
    Join Date
    Aug 2001
    Location
    Indonesia
    Posts
    3,732

    Default

    They will be removed. Because there is drop table sql command if the table is exist.
    Since the table drop, the table structure and data is removed. Then it will be replaced with the new one (from old directory).

    Please tell me if it's not a solusion. If you need to keep the current data and custom field. Yes you can with different method, but it is more complicated. Feel free to ask if you need it.

  7. #7
    Join Date
    May 2004
    Location
    New Zealand
    Posts
    600

    Default

    Cheers Dody,

    Yeh its not really the solution im looking for.

    basically i want to keep the 2.4 database structure and just add on customfields.

    I think in the mean time its going to be faster for me to add them one by one through the admin section. But im just thinking when people upgrade does this automatically bring the customfields across with it?

    What would be awesome is copying the custom field structure and data across via import , just like you can do with links, and then being able to run a update (just like updating path structure etc) which would then do all the database side of things such as putting them in the link and link_temp tables etc...

    Cheers for the help,
    Great to you have you back

Similar Threads

  1. Custom fields
    By dmsteph in forum INDEXU DELUXE v1.x
    Replies: 2
    Last Post: 02-17-2009, 03:55 PM
  2. Custom fields
    By jdez in forum v5.x
    Replies: 3
    Last Post: 02-06-2008, 11:17 PM
  3. Custom Fields
    By L.Murugesan in forum Tutorials, Hints & Tips
    Replies: 1
    Last Post: 05-25-2007, 03:11 PM
  4. export / import custom fields
    By lexpression in forum v5.x
    Replies: 4
    Last Post: 05-25-2005, 11:14 AM
  5. Replies: 1
    Last Post: 06-24-2002, 06:23 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
  •