ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Query for custom profile fields

September 15, 2009 12:44am

Subscribe [1]
  • #1 / Sep 15, 2009 12:44am

    wecreateyou

    86 posts

    I found this query on the forums
    exp:query sql=“SELECT * FROM exp_members NATURAL JOIN exp_member_data”

    I need to have this query return only members who have a certain custom_field that’s not empty. It returns all the members at this point but I need members who didn’t fill out the custom_field to be omitted from the results. Is this possible.

    I’m playing around with conditionals but so far no luck.

    
    

    I need members who did not fill out the two custom fields to NOT show up in the results.

    Thanks

  • #2 / Sep 15, 2009 9:59am

    ender

    1644 posts

    SELECT * FROM exp_members NATURAL JOIN exp_member_data WHERE certain_field <> ''
  • #3 / Sep 15, 2009 10:25am

    wecreateyou

    86 posts

    Thanks ender, I was pretty sure It would be a simple one. I appreciate your help.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases