insert into wp table

Solutions on MaxInterview for insert into wp table by the best coders in the world

showing results for - "insert into wp table"
Greta
03 Sep 2016
1global $wpdb;
2$table = $wpdb->prefix.'you_table_name';
3$data = array('column1' => 'data one', 'column2' => 123);
4$format = array('%s','%d');
5$wpdb->insert($table,$data,$format);
6$my_id = $wpdb->insert_id;
7