Skip to:
Content
Pages
Categories
Search
Top
Bottom

simple bbdb query?

  • I’ve been looking all over the forums for this –

    I’m trying to separate the profile data that gets spewed out by the bb_profile_data function. I managed to get website + last online, but how do I separate the other values (such as location/occupation)? Does anyone know a simple bbdb query I can make to grab meta_value field values directly from the database? Can I call the query in a template file (like the Profile page?)

Viewing 2 replies - 1 through 2 (of 2 total)
  • Seems like this works for pulling the Location value (on the Profile page):

    global $bbdb;

    $userid = $user->ID;

    $profiledata = $bbdb->get_var( “SELECT meta_value FROM $bbdb->usermeta WHERE meta_key = ‘from’ AND user_id = $userid”);

    echo $profiledata;

    It’s a lot safer to use the API calls.

    bb_get_user($user_id) will return an object filled with the users data and meta data.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar