get_results not returning anything
Question
What is the basic way to use $wpdb and get_results?
This is my code:
global $wpdb;
$q="SELECT * FROM wp_usermeta WHERE meta_key = 'nickname' AND user_id = 771";
$result = $wpdb->get_results($q);
echo $result;
The query string is good because I can run it in phpmyadmin and it works fine. I am not getting anything back when run through page.
0
user-meta, wpdb
4 years
2020-05-24T09:10:38-05:00
2020-05-24T09:10:38-05:00 0 Answers
106 views
0
Leave an answer