insert( $wpdb->new_table, array('first_name' => 'Lars'), array('id' => 123) ); $insert_id = $wpdb->insert_id; # - OR - global $wpdb; $wpdb->query(" INSERT INTO $wpdb->new_table (id) VALUES ('123') "); //////////////////////// # Update Row //////////////////////// global $wpdb; $wpdb->update( $wpdb->new_table, array('first_name' => 'Lars'), array('id' => 123) ); # - OR - global $wpdb; $wpdb->query(" UPDATE $wpdb->new_table SET first_name = 'Lars' WHERE 1=1 AND ID = '123' "); //////////////////////// # Delete Row //////////////////////// global $wpdb; $wpdb->delete( $wpdb->table_name, array('id' => 123) ); # - OR - global $wpdb; $wpdb->query(" DELETE FROM $wpdb->new_table WHERE 1=1 AND ID = '123' "); //////////////////////// # Get Results //////////////////////// global $wpdb; $results = $wpdb->get_results(" SELECT * FROM $wpdb->new_table WHERE 1=1 AND first_name = 'Lars' "); if(!empty($results)){ foreach($results as $result){ echo '
'; print_r($result); echo ''; } } //////////////////////// # Get Row //////////////////////// global $wpdb; $result = $wpdb->get_row(" SELECT * FROM $wpdb->new_table WHERE 1=1 AND id = '123' "); //////////////////////// # Count Rows //////////////////////// global $wpdb; $count = $wpdb->get_var(" SELECT COUNT(*) FROM $wpdb->new_table WHERE 1=1 "); ?>