1. Home
  2. Docs
  3. Function Reference
  4. Functions
  5. general_update_fn()

general_update_fn()

Update a database record. Close to $wpdb->update but you don’t have to handle formats, and it will bind your table so any fields not existing in your table will be filtered.

Copy to Clipboard

Parameters

$table_str

Target table, escaped in the function.

$data_arr

Data to save to database, escaped in the function.

$where_arr

Locate the entries to update, escaped in the function.

$echoQuery_bln

If true the query will be echoed out (default false)

$prefixMe_bln

If true, prefixes table names with the WordPress table prefix (default true)

Return

boolean

Returns a boolean of whether the update was successful or not.

Example

Copy to Clipboard

Location

This function can be found here: