• Resolved rc169

    (@rc169)


    Hello,

    I have a table with a column where URLs will be shown – if there is a file associated with the specific record. If not, the cell should be empty. In phpmyAdmin, the cell is shown as Varchar(256), Null = Yes, Default = NULL. In the initial development version of the site, this functioned correctly – i.e. nothing at all shown in the cells where there is no associated file.

    In the second development version of the site, the column is specified with the same settings, but the word “NULL” is always displayed when I view the data in WP Data Access “Data Explorer”. Can you advise how to prevent this – presumably a setting must be adjusted? the cell should be empty if there is no associated file.

    Thanks in advance for your help.

    Nigel

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter rc169

    (@rc169)

    Hello,

    I’m not sure why this has happened, but I deleted and re-created the fields in the plugin, and now the word “NULL” has disappeared from the view in “Data Explorer” – which is the desired effect. Possibly the earlier issue arose because I had created the fields in phpMyAdmin rather than in the plugin.

    Nigel

    Plugin Contributor Kim L

    (@kimmyx)

    Hi Nigel,

    Thanks for the update.

    Are you using the latest version of the plugin on both sites?

    Just an FYI if you still have 5.3.9 installed, that version is failing to see an update on the plugins page, so you need to update manually.

    Please see this post: IMPORTANT message for Free users with version 5.3.9 installed | www.ads-software.com

    We’ll wait for your response.

    • This reply was modified 1 year, 7 months ago by Kim L.
    Thread Starter rc169

    (@rc169)

    Hi Kim,

    Thanks for your message. Both of the sites in question have version 5.3.15 of WP Data Access. I had seen the notice about version 5.3.9, but I did not experience the problem described.

    Thanks again.

    Nigel

    Plugin Contributor Kim L

    (@kimmyx)

    Hi Nigel,

    Thanks for the confirmation!

    Do you still have issues with NULL values or are you sorted out for now?

    I’ll let Peter know about the columns created from phpMyAdmin in case he has a chance to check it out.

    Feel free to message us again if you have more information and if you have more questions. ??

    How would you do the opposite? I would like to differentiate between NULLs and empty strings as in my table a NULL value means that the value is unknown, whereas an empty string means that it is known that there is no value. I’ve noticed, however, that already in the Explorer the NULLs show up as empty cells, so when trying to add a function to “columns” → “render” option under Advanced Settings, the data that gets passed in is an empty string in both cases, so there seems to be no way to tell whether it was originally a NULL or “”.

    Also, while on the topic of NULLs — I’ve enabled the search panes in my table and they nicely give me the option to view all rows with a NULL in a certain column, however when I click on one it will only display the rows that had empty strings in the respective column originally and keep playing the loading animation forever.

    Thread Starter rc169

    (@rc169)

    Hi Kim,

    The issue with “NULL” values is now resolved from my perspective, since I do not want anything to be displayed in the cell if there is no valid data. However, I didn’t make any changes to settings, so I am not sure why the problem arose – the comment about phpMyAdmin was only a suggestion. If there is a specific way to control what is displayed in those circumstances, I guess that would also answer Mihkel’s question.

    Thanks again,

    Nigel

    Plugin Contributor Kim L

    (@kimmyx)

    Hi @mihkelroomet,

    Your column needs to be defined with DEFAULT NULL when the table is created. This way, WordPress will see it as NULL as long as no value is entered.

    Also, while on the topic of NULLs — I’ve enabled the search panes in my table and they nicely give me the option to view all rows with a NULL in a certain column, however when I click on one it will only display the rows that had empty strings in the respective column originally and keep playing the loading animation forever.

    Could you send us a message at Contact | WP Data Access regarding this issue? We might need to take a closer look. You can also create a new thread for this so we that we can close this thread for now.

    And thank you very much for the update, Nigel! ?? As always feel free to message or create a new thread if you encounter new issues or if you have new questions.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Prevent “NULL” appearing in cell with no data’ is closed to new replies.