Location of records in the database

Support General Location of records in the database

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #48510
    Jayron CastroJayron Castro
    Participant

    I created a custom field and set it to be displayed on a settings page, now I need to view the records directly in the database to delete some records that are being "garbage", my question is in which table are these records stored?

    <?php
    $groups = rwmb_meta( 'tecnicos__grupo', [ 'object_type' => 'setting' ], 'customizacao-do-site' );
    foreach ( $groups as $group ) {
    	
    	// Field tecnicos__foto_do_membro:
    	$image_ids = $group[ 'tecnicos__foto_do_membro' ] ?? [];
    	?>
    	<h3>Uploaded images</h3>
    	<ul>
    		<?php foreach ( $image_ids as $image_id ) : ?>
    			<?php $image = RWMB_Image_Field::file_info( $image_id, [ 'size' => 'thumbnail' ] ); ?>
    			<li><img src="<?php echo $image['url']; ?>"></li>
    		<?php endforeach; ?>
    	</ul>
    	<?php
    	
    	// Field tecnicos__nome_do_membro:
    	echo $group[ 'tecnicos__nome_do_membro' ] ?? '';
    	
    	// Field tecnicos__vinculo_do_membro:
    	echo $group[ 'tecnicos__vinculo_do_membro' ] ?? '';
    	
    	// Field tecnicos__bolsista:
    	$checkbox = $group[ 'tecnicos__bolsista' ] ?? 0;
    	if ( $checkbox ) {
    		echo 'Checked';
    	} else {
    		echo 'Unchecked';
    	}
    
    }
    ?>
    #48512
    PeterPeter
    Moderator

    Hello Jayron,

    You can access the database, check the table wp_options and option name customizacao-do-site which stores all field values in the settings page.

    Refer to the documentation https://docs.metabox.io/extensions/mb-settings-page/#data

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.