PHP variables in mysql query

To insert a new row:

global $wpdb;
$wpdb->insert( 
    'wp_mytable',
    array( 'product' => $product ),
    array( '%s' ) 
);

For the sake of completeness, $wpdb->update is used to update an existing row and requires an additional WHERE clause, as would a “regular” SQL query. For example:

global $wpdb;
$wpdb->update( 
    'wp_mytable',
    array( 'product' => $product ),
    array( 'product_id' => 1312 ),
    array( '%s' ),
    array( '%d' )
);

tech