Dark

Light

Dark

Light

Scroll to top

How to update data in wordpress database table with functions.php?

How to update data in wordpress database table with functions.php?

	global $wpdb;
	$quotetable = $wpdb->prefix . "quote";	
        $where = array(
			'ID' => $id
		);	
	$wpdb->update( $quotetable,
		array(
		'useremail' => $useremail,
		'quote_no' => "123",
		'product_ids' => "1,2,3"
		), $where
	);
Author avatar
Amitpal Singh
https://amitpalsingh.com

Post a comment

Your email address will not be published. Required fields are marked *