Hot answers tagged wpdb
Refrain from editing core files WordPress was developed with extensibility in mind, and provides many ways to change the appearance and functionality of an installation without altering the WordPress software itself (mostly using Hooks in conjunction with Plugins and Themes). The software is comprised of it's "core files", which are generally ...
You should'nt really be using wp query here, use get_user_meta(); Example: $first_name = get_user_meta(2, 'first_name', true);
The userid will not exist until the user is inserted, you would need to do a second update for that. You may be better off using PHP's uniqid(), perhaps with the user's email as a salt/prefix to avoid a race condition (however unlikely).
WordPress is notoriously against ordering by terms. Of course it's precisely what people need to accomplish in practice. And precisely a mess with a very clunky database representation of them (which is planned to be slowly improved over several releases to be fair). In a nutshell the issues with your query are: it's preferable to work with WP_Query, even ...
Only top voted, non community-wiki answers of a minimum length are eligible