Title: update all string
Last modified: December 8, 2018

---

# update all string

 *  [vipman](https://wordpress.org/support/users/vipman/)
 * (@vipman)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/update-all-string/)
 * Hi dear X*Nai, i download with your site addon “BDB delete swith”, this very 
   cool addon for plagins, but me need exactly, but only with “Update”, say me pliz
   what part a code prevens me ‘update’ all the line?
 *     ```
       class PDb_Record_Delete_Switch {
   
         private $update_switch_field_name = 'update_record';
   
         private $participant_record_ubdate;
   
         public function __construct()
         {
   
           add_action( 'pdb-after_submit_update', array($this, 'check_for_update') );
   
           add_filter( 'pdb-register_global_event', array($this, 'register_events'), 30 );
         } 
        private function process_deletion()
         {
           global $wpdb;
           $sql = 'UPDATE FROM *' . Participants_Db::$participants_table . ' WHERE <code>id_person</code> < 0';
           $success = $wpdb->query( $wpdb->prepare( $sql, $this->participant_record_update['id_person'] ) );
   
           // if we're debugging, dump the query to the log
           if ( PDB_DEBUG )
             error_log( __METHOD__ . ' query: ' . $wpdb->last_query );
   
           if ( $success ) {
   
             Participants_Db::$plugin_options['no_record_error_message'] = __( 'Все записи обновлены.' );
   
             do_action( 'pdb-record-delete-switch_record_deleted', $this->participant_record_update );
           }
         }
   
       lic function register_events()
         {
           return array(
               'pdb-record-delete-switch_record_deleted' => __( 'User Record UPDATE' ),
           );
         }
   
       }
   
       new PDb_Record_Delete_Switch();
       ```
   
 * P.s You ask why would I do that? – in order for the user to be able to update
   their records(after the” update ” user record rises to the first position), if
   you know how to do it differently, then share the decision pliz

The topic ‘update all string’ is closed to new replies.

 * ![](https://ps.w.org/participants-database/assets/icon-256x256.jpg?rev=1389807)
 * [Participants Database](https://wordpress.org/plugins/participants-database/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/participants-database/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/participants-database/)
 * [Active Topics](https://wordpress.org/support/plugin/participants-database/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/participants-database/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/participants-database/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [vipman](https://wordpress.org/support/users/vipman/)
 * Last activity: [7 years, 6 months ago](https://wordpress.org/support/topic/update-all-string/)
 * Status: not resolved