• Resolved jaykdoe

    (@jaykdoe)


    Hi,

    How can I get a profile field value to either display in a page template or echo as a php variable.

    I am trying to grab it directly from the database in a php file like this

    $array = $mysqli->query(

    “Select meta_value FROM wp_usermeta WHERE meta_key = xapo_address AND user_id = “.$subid.””
    );

    But I get the following error in my script
    Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given

    And when I try to execute the SQL query in the database like this
    Select meta_value FROM wp_usermeta WHERE meta_key = field_name AND user_id = “1”

    I get this error
    #1054 – Unknown column ‘field_value’ in ‘where clause’

    I don’t have any other idea how to pull the custom field value to use in a template, script, or even just for display.

    Any help would be amazing, as this is the last thing I need!

    • This topic was modified 7 years, 6 months ago by jaykdoe.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Get profile field value’ is closed to new replies.