• Resolved jsafire

    (@jsafire)


    General question. My issue is in an admin-only page.

    I have a membership site with custom fields for a custom post type. A report of these records works for all (~200 members) except about 10. Those 10 records have one or two empty fields for phone numbers (e.g., fax, other.) If I enter ‘ ‘ in those fields, they show correctly in the report. How can I fix this (or what am I doing wrong)? I am familiar with NULL and NOT NULL in MySQL, but I could not make any of that work.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Scott Kingsley Clark

    (@sc0ttkclark)

    Sorry for the delay here, I only periodically check support forums for some of my smaller plugins as most of my time is spent on the Pods Framework these days.

    I’m not sure what you are referring to here — can you provide the SQL query you are referencing for this?

    Plugin Author Scott Kingsley Clark

    (@sc0ttkclark)

    Oh I just realized your query probably uses JOINs for the meta fields, correct? If so, be mindful of the type of JOIN you are doing. See here for a cool run-down: https://www.guru99.com/joins.html

    What you likely want here could be a LEFT JOIN which ensures that if the value does not exist in the joining table that the row from the original FROM is still returned.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Report ignores rows with a blank field’ is closed to new replies.