wpdb (tag)

maybe_convert_table_to_utf8mb4()

Converts table fields to the encoding utf8mb4_unicode_ci, if there are fields in the table with encoding utf8_* or utf8mb4_*.

wpdb::delete()

Deletes rows from the table based on the condition specified in the $where parameter.

wpdb::esc_like()

Prepares a string for use in the LIKE part of an SQL query. Processes special characters % and _.

wpdb::get_col()

Makes a request and retrieves data from one column of the database table as an array.

wpdb::get_col_info()

Gets an array with information about the columns of the last query.

wpdb::get_results()

Gets all data of the specified query (all rows and columns). The result is returned as an array. Each element of the array is an object with data of a separate row of the table.

wpdb::get_row()

Gets the first row from the result of an SQL query. Returns the row as an object.

wpdb::get_var()

Gets the value of a single cell from the query result. By default, the first cell is taken — this is the first column and the first row.

wpdb::insert()

Inserts a row (the specified data) into the specified table.

wpdb::prepare()

Allows writing an SQL query with sanitization of the parameters passed to it.

wpdb::query()

Executes any queries to the WordPress database.

wpdb::replace()

Обновляет или создает строку в таблице.

wpdb::update()

Updates the specified data in the specified row of the DB table.