Conert Excel data for SQL Database (phpMySQL)

Support General Conert Excel data for SQL Database (phpMySQL)Resolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #44542
    EricEric
    Participant

    Hi There,

    As I have a lot of data for a new project, and finally I decide to use my Excel file directly for my customs fields of a post type.

    For that...
    - I have created a post type
    - I have created some customs fields into Meta Box - saved data in a custom table.
    - I have done 2 posts to see who it reflects into my database (SQL)
    - I have converted the Excel file into an SQL file - using a Saas app.

    After...
    - After a [few] adjustments (quicker than to fill up posts by hand with data), I have uploaded my SQL file into my database (INSERT INTO wp_mytype) - all worked fine
    - After I had to make an SQL file for inserting all post IDs - INSERT INTO wp_posts (used the example of the 2 first post)

    All seems to work fine. I can see and update any fields in any posts.

    My question...:)

    As I don't want any surprise in the future, can you tell me if I need to do something else, to make sure my data will be available any time for queries?
    Or maybe what I've done is just "bad"?

    Thank you,
    Eric

    #44568
    PeterPeter
    Moderator

    Hello Eric,

    I don't have more idea about your approach to import data to your database. Just ensure the post IDs are auto-increment (1, 2, 3 ...) when importing data and you have a backup of the database before doing that.

    #44570
    EricEric
    Participant

    Hi Peter,

    Yes, I took care of the IDs, and that was easy because it's only the beginning of the project.
    So far, I am glad that I thought of this way, because I had a lot of data (all countries), and plugins & tools for that were not 100% sure and pretty expensive (Excel → SQL).
    Anyway, thanks for your expertise 🙂

    Eric

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.