If you want best practices of the options you listed use the user meta table.
Adding a column to the users table would be the worst thing you could do – messing with table structure of default WP tables is a no-no.
The other two options would fall somewhere in between – with adding your own table being least preferred.
But why don’t you use the WP_User_Query class?
$user_by_kin = new WP_User_Query(
array(
'meta_key' => 'kin_id',
'meta_value' => $kin_id,
'meta_compare' => '='
)
);
Related Posts:
- Update vs Insert logic but the last key is always inserted?
- Differences between wpdb->get_results() and wpdb->query()
- How to Use Wildcards in $wpdb Queries Using $wpdb->get_results & $wpdb->prepare?
- wpdb get posts by taxonomy SQL
- Multipart/formatted MySQL query problem
- Custom $wpdb Query for Custom Post Type by Category
- Can’t pass table to $wpdb->prepare
- $wpdb->get_var not returning a result
- Most effective use of DB querys
- $wpdb->query() vs. $wpdb->get_results() vs. phpMyAdmin
- wpdb::prepare() isn’t working
- Select User by Joining Multiple Meta Value Results
- $wpdb doesn’t appear to work on page inside of a plugin
- Strange string in console from wpdb query
- Using $wpdb->update but confused on the WHERE in and SET
- What’s wrong with my $wpdb prepare?
- Make one query for adding entries to database
- How to execute a SQL-query which contains multiple queries using $wpdb->query?
- Alter a specific query on WordPress
- mysql query two database tables, users and usermeta and sort by custom meta int value
- wpdb->term_taxonomy count posts from both published and private posts?
- wpdb print all post meta
- wpdb query problem to access previous 3 days posts
- How to write: $wpdb->update having WHERE NOT value pair in the array
- I can’t figure out what’s wrong with this statement. $wpdb->query update
- Problem when try to add ++1 for user meta
- Use mysql_query instead of $wpdb query
- wpdb COALESCE won’t work
- Custom Query – Based on user input
- Custom SQL Query passing array to WHERE p.id
- Get posts from category with custom query
- Custom Query returns array, but I can’t see it’s elements
- How to exclude posts for current user
- Valid SQL query return empty
- mysql query – how to escape apostrophe?
- Query Nickname rather than Display Name in custom Woocommerce plugin
- $wpdb->prepare affecting the query?
- prepare function sql safe method
- Updating with $qpdb->query() always returns 0 rows affected
- How to return count of custom post type posts with a specific custom field value via $wpdb?
- WordPress Mysql query and Duplicate
- How do I query for posts by custom meta and those that have been stickied?
- Help with Related Posts Function
- wpdb update multiple row?
- Combining two meta_values within one row with query
- Formatting a date/time returned from a custom $wpdb query
- Improve performance of slow query
- How do I get specific readable results from this query and array results
- How to do a sql like query on serialized data of user meta data
- implementing my wp_query using $wpdb class
- Exclude Posts from a Widget
- Fastest and most efficient SQL query to check if UID exists
- Use $wpdb->get_results with filter based on array
- $wpdb query for price in custom field value
- Querying users by meta value and getting a strange answer
- Display result from custom post meta query
- Wpdb empty result only if language is Russian
- Run an update query in a function
- How to fix this insert? Don’t work for me!
- Problem on wpdb queries, wp_insert_post, wp_insert_user etc. The query runs twice
- There is way to improve this query? wordpress get post data and some meta data
- $wpdb: how to use a query as a base for another query?
- Wpdb generates too many queries
- Custom Query for searching through custom fields
- Mysql query and odd results
- list or get meta_key where meta_value is ‘something’
- How to reference same column name but different table in custom db query
- Retrieving custom field array value through db query
- How to get one result using wpdb class?
- Delete query won’t run
- update $wpdb one query
- How can I create a meta_query with an array as meta_field?
- Query multiple meta key values?
- How to get a buddypress user profile link and a certain user profile field for the current post author?
- Is there a way of increasing the speed of this query?
- When/why does ‘$query->get( ‘tax_query’ );’ return empty?
- Remove [gallery] shortcode altogether
- How to make an activities stream mixing posts and comments?
- $wpdb returns no results with SELECT query on custom post type, works on default post type
- Why a URL with a query is always slower than that without a query?
- Maintaining Queries in URL
- wpdb php get_var query to get ID for URL image doesn’t work for ID over 999
- Different values for get_author_posts_url and get_the_author (posts 2 posts)
- query statement containing variable won’t execute
- Related post based on content
- How to interfere to default search to make it search in custom fields?
- WP_User_Query with more than two custom meta values
- Declaring a var, placing it in a query and using the output of the query?
- List only parent attributes on woocommerce admin atrributes page
- My custom pagination not displaying
- Exclude Posts Using Meta Query and User Meta
- Wpdb->last_query returns bad query
- WP search exclude last letter from string
- How to reduce the load / no of queries on MySql Database
- Show certain number of post from tags
- How can I display a number to represent the order of post?
- Sort order in get_posts [closed]
- Query unique author ids with published post of type job
- Query posts alphabetically within this function
- Conditional Tag Custom Querys?