Best way to insert data into wordpress custom tables

Lets say you have a custom table “wp_monitoring_processes” and you wan to add data to it via your custom plugin.

The good way to do it is just like this:

[php]

function save_paused_process($post){
global $wpdb;

$insert = array(
‘start_date’                 => $post[‘start_date’],
‘pause_date’                 => date(‘Y-m-d h:i:s’),
‘offset’                    => $post[‘offset’],
‘rows_unchecked’            => $post[‘rows_unchecked’],
‘last_json’                    => json_encode($post),
‘seller’                    => $post[‘seller’],
‘set_id’                    => $post[‘monitoring_set’],
‘check_http’                => $post[‘check_http’],
‘check_thumb’                => $post[‘check_thumb’],
‘check_published’            => $post[‘check_published’],
‘check_matching_skus’        => $post[‘check_matching_skus’],
‘list_incomplete’            => $post[‘list_incomplete’],
‘list_when_text_found’        => $post[‘list_when_text_found’],
‘list_when_text_not_found’    => $post[‘list_when_text_not_found’],

);
$wpdb->insert( "wp_monitoring_processes", $insert);
return true;
}

[/php]

Notice the “$wpdb->insert()”