Insert new data into a database. Close to $wpdb->insert 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
Target table, escaped in the function
$data
Data to save to database, escaped in the function
$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
mixed
Returns inserted ID, if failed, false will be returned.
Example
Copy to Clipboard