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.