Get profile field value
-
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
WHEREmeta_key
=xapo_address
ANDuser_id
= “.$subid.””
);But I get the following error in my script
Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean givenAnd when I try to execute the SQL query in the database like this
Select meta_value FROMwp_usermeta
WHEREmeta_key
=field_name
ANDuser_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!
- The topic ‘Get profile field value’ is closed to new replies.