WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Where am I going wrong selecting a custom field from the database? (1 post)

  1. PerryRoper
    Member
    Posted 4 years ago #

    I want to retrieve a custom field called fbuid from the wp-usermeta field in the comment-template.php, here is what I have

    <?php $avatar_uid = get_comment($comment->comment_ID)->user_id; ?>
            <?php $fb_uid = $wpdb->get_results("SELECT meta_value FROM $wpdb->usermeta WHERE user_id = $avatar_uid AND meta_key= 'fbuid'"); ?>

    Any help would be greatly appreciated.

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic