Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 6035

The wpdb class, accessed via the $wpdb global variable, is used to interact with the WordPress database

1 vote

How to split the a table in database?

Sharding is probably not what you want, especially if the admin area is the only problem. If things are working fine on the front end, you're probably okay. How many posts are we talking about total …
chrisguitarguy's user avatar
32 votes
Accepted

Fetch array with $wpdb

php $query = $wpdb->get_results("SELECT * FROM videos", ARRAY_A); Unfortunately, wpdb doesn't allow you to "stream in" results like you're doing, so you'll need to use a foreach loop. <? …
chrisguitarguy's user avatar
2 votes
Accepted

Where to store the name of a custom table?

You use $wpdb->prefix (or $wpdb->base_prefix) to prefix the table Your table name is someplace public, and easily available for other plugins, themes and end users to use and extend I would say either … setting the table as a property on $wpdb or using a constant is fine. …
chrisguitarguy's user avatar
4 votes
Accepted

Theoretical Multi-Server WordPress Setup with Shared Users

It may be possible. A lot of the core API that deals with logins and cookies is pluggable. You could replace wp_set_current_user with something that queried your external database rather than the in …
chrisguitarguy's user avatar
1 vote
Accepted

Select From wpdb - Author/User Directory page

You're probably better off to use get_users which returns an array of <?php // get all users, regardless of roll. If you do need to restrict by // role you can use the `role` argument: get_users(ar …
chrisguitarguy's user avatar