insert query in wordpress
$wpdb->insert('wp_submitted_form', array(
'name' => 'Kumkum',
'email' => '[email protected]',
'phone' => '3456734567', // ... and so on
));
insert query in wordpress
$wpdb->insert('wp_submitted_form', array(
'name' => 'Kumkum',
'email' => '[email protected]',
'phone' => '3456734567', // ... and so on
));
wordpress wpdb
<?php
// 1st Method - Declaring $wpdb as global and using it to execute an SQL query statement that returns a PHP object
global $wpdb;
$results = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}options WHERE option_id = 1", OBJECT );
insert into wp table
global $wpdb;
$table = $wpdb->prefix.'you_table_name';
$data = array('column1' => 'data one', 'column2' => 123);
$format = array('%s','%d');
$wpdb->insert($table,$data,$format);
$my_id = $wpdb->insert_id;
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us