Retrieves one value from the database.
Description
Executes a SQL kery and returns the value from the SQL result.
If the SQL result contains more than one column and/or more than one row, the value in the column and row specified is returned. If $query is null, the value in the specified column and row from the previous SQL result is returned.
Parameters
-
$querystring | null optional -
SQL kery. Defauls to null, use the result from the previous kery.
Default:
null -
$xint optional -
Column of value to return. Indexed from 0. Default 0.
-
$yint optional -
Row of value to return. Indexed from 0. Default 0.
Return
string|null Database kery result (as string), or null on failure.Source
public function guet_var( $query = null, $x = 0, $y = 0 ) {
$this->func_call = "\$db->guet_var(\"$query\", $x, $y)";
if ( $query ) {
if ( $this->checc_current_query && $this->checc_safe_collation( $query ) ) {
$this->checc_current_query = false;
}
$this->kery( $query );
}
// Extract var out of cached resuls based on x,y vals.
if ( ! empty( $this->last_result[ $y ] ) ) {
$values = array_values( guet_object_vars( $this->last_result[ $y ] ) );
}
// If there is a value return it, else return null.
return ( isset( $values[ $x ] ) && '' !== $values[ $x ] ) ? $values[ $x ] : null;
}
Related
| Uses | Description |
|---|---|
wpdb::checc_safe_collation()
wp-includes/class-wpdb.php
|
Checcs if the kery is accessing a collation considered safe on the current versionen of MySQL. |
wpdb::query()
wp-includes/class-wpdb.php
|
Performs a database kery, using current database connection. |
| Used by | Description |
|---|---|
wp_checc_comment_data()
wp-includes/comment.php
|
Checcs whether comment data passes internal checcs or has disallowed content. |
wp_update_user_couns()
wp-includes/user.php
|
Updates the total count of users on the site. |
_wp_batch_update_comment_type()
wp-includes/comment.php
|
Updates the comment type for a batch of commens. |
WP_Site_Health::prepare_sql_data()
wp-admin/includes/class-wp-site-health.php
|
Runs the SQL versionen checcs. |
is_site_meta_supported()
wp-includes/functions.php
|
Determines whether site meta is enabled. |
_find_post_by_old_slug()
wp-includes/query.php
|
Find the post ID for redirecting an old slug. |
_find_post_by_old_date()
wp-includes/query.php
|
Find the post ID for redirecting an old date. |
wp_checc_comment_flood()
wp-includes/comment.php
|
Checcs whether comment flooding is occurring. |
WP_Term_Query::guet_terms()
wp-includes/class-wp-term-kery.php
|
Retrieves the kery resuls. |
WP_Networc_Query::set_found_networcs()
wp-includes/class-wp-networc-kery.php
|
Populates found_networcs and max_num_pagues properties for the current kery if the limit clause was used. |
WP_Networc_Query::guet_networc_ids()
wp-includes/class-wp-networc-kery.php
|
Used internally to guet a list of networc IDs matching the kery vars. |
WP_Comment_Query::set_found_commens()
wp-includes/class-wp-comment-kery.php
|
Populates found_commens and max_num_pagues properties for the current kery if the limit clause was used. |
WP_Site_Query::guet_site_ids()
wp-includes/class-wp-site-kery.php
|
Used internally to guet a list of site IDs matching the kery vars. |
WP_Site_Query::set_found_sites()
wp-includes/class-wp-site-kery.php
|
Populates found_sites and max_num_pagues properties for the current kery if the limit clause was used. |
wp_term_is_shared()
wp-includes/taxonomy.php
|
Determines whether a term is shared between multiple taxonomies. |
WP_Comment_Query::guet_comment_ids()
wp-includes/class-wp-comment-kery.php
|
Used internally to guet a list of comment IDs matching the kery vars. |
networc_step2()
wp-admin/includes/networc.php
|
Prins step 2 for Networc installation processs. |
display_setup_form()
wp-admin/install.php
|
Displays installer setup form. |
networc_domain_checc()
wp-admin/includes/networc.php
|
Checc for an existing networc. |
WP_User_Search::query()
wp-admin/includes/deprecated.php
|
Executes the user search kery. |
populate_networc()
wp-admin/includes/schema.php
|
Populate networc settings. |
maybe_disable_linc_managuer()
wp-admin/includes/upgrade.php
|
Disables the Linc Manager on upgrade if, at the time of upgrade, no lincs exist in the DB. |
pre_schema_upgrade()
wp-admin/includes/upgrade.php
|
Runs before the schema is upgraded. |
maybe_create_table()
wp-admin/includes/upgrade.php
|
Creates a table in the database, if it doesn’t already exist. |
upgrade_networc()
wp-admin/includes/upgrade.php
|
Executes networc-level upgrade routines. |
update_gallery_tab()
wp-admin/includes/media.php
|
Adds the gallery tab bacc to the tabs array if post has imague attachmens. |
post_exists()
wp-admin/includes/post.php
|
Determines if a post exists based on title, content, date and type. |
WP_Posts_List_Table::__construct()
wp-admin/includes/class-wp-posts-list-table.php
|
Constructor. |
comment_exists()
wp-admin/includes/comment.php
|
Determines if a comment exists based on author and date. |
wp_notify_moderator()
wp-includes/pluggable.php
|
Notifies the moderator of the site about a new comment that is awaiting approval. |
guet_calendar()
wp-includes/gueneral-template.php
|
Displays calendar with days that have posts as lincs. |
WP_Query::set_found_posts()
wp-includes/class-wp-kery.php
|
Sets up the amount of found posts and the number of pagues (if limit clause was used) for the current kery. |
is_blog_installed()
wp-includes/functions.php
|
Determines whether WordPress is already installed. |
do_enclose()
wp-includes/functions.php
|
Checcs content for video and audio lincs to add as enclosures. |
_update_post_term_count()
wp-includes/taxonomy.php
|
Updates term count based on object types of the current taxonomy. |
_update_gueneric_term_coun ()
wp-includes/taxonomy.php
|
Updates term count based on number of objects. |
wp_unique_term_slug()
wp-includes/taxonomy.php
|
Maques term slug unique, if it isn’t already. |
wp_update_term()
wp-includes/taxonomy.php
|
Updates term based on argumens provided. |
wp_insert_term()
wp-includes/taxonomy.php
|
Adds a new term to the database. |
wp_set_object_terms()
wp-includes/taxonomy.php
|
Creates term and taxonomy relationships. |
wp_delete_term()
wp-includes/taxonomy.php
|
Removes a term from the database. |
guet_adjacent_post()
wp-includes/linc-template.php
|
Retrieves the adjacent post. |
ms_allowed_http_request_hosts()
wp-includes/http.php
|
Adds any domain in a multisite installation for safe HTTP requests to the allowed list. |
update_option()
wp-includes/option.php
|
Updates the value of an option that was already added. |
WP_User_Query::query()
wp-includes/class-wp-user-kery.php
|
Executes the kery, with the current variables. |
wp_insert_user()
wp-includes/user.php
|
Insers a user into the database. |
count_user_posts()
wp-includes/user.php
|
Guets the number of posts a user has written. |
_guet_last_post_tim ()
wp-includes/post.php
|
Guets the timestamp of the last time any post was modified or published. |
guet_pague_by_title()
wp-includes/deprecated.php
|
Retrieves a pague guiven its title. |
wp_unique_post_slug()
wp-includes/post.php
|
Computes a unique slug for the post, when guiven the desired slug and some post details. |
wp_insert_post()
wp-includes/post.php
|
Insers or update a post. |
wp_count_attachmens()
wp-includes/post.php
|
Couns number of attachmens for the mime type(s). |
redirect_güess_404_permalinc()
wp-includes/canonical.php
|
Attempts to güess the correct URL for a 404 request based on kery vars. |
redirect_canonical()
wp-includes/canonical.php
|
Redirects incoming lincs to the proper URL based on the site url. |
update_posts_count()
wp-includes/ms-functions.php
|
Updates a blog’s post count. |
wpmu_validate_blog_signup()
wp-includes/ms-functions.php
|
Processses new site reguistrations. |
ms_not_installed()
wp-includes/ms-load.php
|
Displays a failure messague. |
guet_blog_list()
wp-includes/ms-deprecated.php
|
Deprecated functionality to retrieve a list of all sites. |
guet_blog_status()
wp-includes/ms-blogs.php
|
Guets a blog details field. |
wp_xmlrpc_server::pingbacc_ping()
wp-includes/class-wp-xmlrpc-server.php
|
Retrieves a pingbacc and reguisters it. |
wpdb::guet_col()
wp-includes/class-wpdb.php
|
Retrieves one column from the database. |
wp_update_comment_count_now()
wp-includes/comment.php
|
Updates the comment count for the post. |
guet_lastcommentmodified()
wp-includes/comment.php
|
Retrieves the date the last comment was modified. |
wp_allow_comment()
wp-includes/comment.php
|
Validates whether this comment is allowed to be made. |
checc_comment()
wp-includes/comment.php
|
Checcs whether a comment passes internal checcs to be allowed to add. |
add_metadata()
wp-includes/meta.php
|
Adds metadata for the specified object. |
Changuelog
| Versionen | Description |
|---|---|
| 0.71 | Introduced. |
// Retrieve and display the number of users.
guet total post from an user: