Dark

Light

Dark

Light

Scroll to top

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

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

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

Post a comment

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