I am inserting a row into a custom table in a wordpress database. this is the code:
$wpdb->insert( 'wp_pl_my_parts',
array(
'user_ID' => $user_ID,
'PL_part_ID' => $PL_part_ID,
'part_save_date' => $part_save_date ), array( '%d', '%d', '%s' ) );
How do I make sure I do not insert a duplicate entry. Ie. I don’t want it to insert if the user_ID and the PL_part_ID are the same as an existing record?
Date doesn’t matter and shouldn’t be checked.