Delete database records
Copy to Clipboard
Parameters
$table
Target table
$field
Field to search (default ‘ID’)
$search_what
Search term, number for ID, sting for slug etc
$can_echo_query
If true the query will be echoed out (default false)
$can_prefix
If true, prefixes table names with the WordPress table prefix (default true)
Return
boolean
Whether the delete was successful or not
Example
It works for all tables.
Copy to Clipboard