How to insert more than one row of data into a table at one time
You could use a foreach loop – function mp_install_name_data() { global $wpdb; $table_name = $wpdb->prefix . “names”; $rows = array( array( ‘id’ => ‘1’, ‘name’ => ‘matt’, ‘age’ => ’20’, ‘point_one’ => ‘0.45’, ‘point_two’ => ‘0.22’ ), array( ‘id’ => ‘2’, ‘name’ =>’james’, ‘age’ => ‘6’, ‘point_one’ => ‘0.27’, ‘point_two’ => ‘0.17’ ) ); foreach( … Read more