imported data in custom table not showing in WordPress

Support MB Custom Table imported data in custom table not showing in WordPress

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #49620
    aryanrajaryanraj
    Participant

    Hi, I created a custom post type and a custom field group. Enabled custom table wp_books as text.

    1. I have created few books and exported the table in csv.
    2. Deleted the book entries/rows from wp_books using phpmydamin/adminer/tableplus.
    3. Imported the same csv back.
    4. Data is not visible.

    Q2. Empty value are getting saved as NULL. how to keep it empty?

    #49621
    aryanrajaryanraj
    Participant

    I understand now that it needs the data from wp_posts so that is what i need to import/export also. i am now looking for help regarding Q2 empty value saving NULL.

    #49625
    PeterPeter
    Moderator

    Hello,

    Thanks for reaching out.

    Can you please let me know how you save the empty value? When edit a post and save or import data?
    If you edit a post and save, the empty value won't be processed and the NULL value won't be inserted into the database.

    #49628
    aryanrajaryanraj
    Participant

    Hi, there is a switch which is 0/1, if enabled shows a file upload field. When a book pdf is available, switch manually get ON/1 and file upload appear.

    mostly the switch is on and file upload field is blank.
    sometime the switch is on and file upload is blank.

    Switch field get 0/1 as per the condition but file upload field is not empty. I am using VARCHAR(2048) NULL for this field. should i remove the NULL?

    #49629
    aryanrajaryanraj
    Participant

    mostly the switch is OFF and file upload field is blank.
    sometime the switch is on and file upload is blank.

    #49630
    PeterPeter
    Moderator

    Hello,

    Yes, you can remove the NULL option. However, you need to delete all rows that have the NULL value first, then change the column file upload to not null.

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