How to view data which is generated by plugin function in wordpress

I am developing a new Plugin and I get the database value into our plugin

function But How to pass these data to view file.I Used following code into the

plugin main file.

 <?php
        /*
            Plugin Name: All Attendees
            Plugin URI: http://my-awesomeness-emporium.com
            Description: a plugin to create awesomeness and spread joy
            Version: 1.2
            Author: Mr. Awesome
            Author URI: http://mrtotallyawesome.com
            License: GPL2
        */
    ?>


<?php
     add_action('admin_menu', 'all_attendees');
        function all_attendees(){
            add_menu_page( 'Attendees Plugin Page', 'Attendees Plugin', 'manage_options', 'attendees', 'attendees_detail' );

        }   
        function attendees_detail(){
            $wpdb = EventPlus::getRegistry()->db->getDb();
            $sql = "SELECT id,reg_type,quantity,event_id,lname,fname,payment,payment_status,email FROM wp_evr_attendee ORDER BY id DESC Limit 30";
            $rows = $wpdb->get_results($sql);
        }
?>

Read more here: How to view data which is generated by plugin function in wordpress

Leave a Reply

Your email address will not be published. Required fields are marked *