Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8485925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:47:22+00:00 2026-06-10T20:47:22+00:00

So following the WPEngineer guide on WP_List_Table (excellent guide by the way), I managed

  • 0

So following the WPEngineer guide on WP_List_Table (excellent guide by the way), I managed to put together a basic table for the backend of a plugin I’m working on. Using an ‘example’ array, it works great. Problem I’m running into is that I can’t figure out for the life of me how to replace that sample data with actual data! Adding the query where I thought it was supposed to be results in the query variable having the correct data, but the table still returns no contents. The referenced pastebin is what I have so far… any thoughts?

http://pastebin.com/f0DCacfF

CORRECTION: It IS pulling the data (if I manually add a row to the database, the table count gets updated), but it’s displaying a blank table.

NOTE: It seems that the sample data is an array, whereas $wpdb->get_results is returning as a stdClass Object.

Sample data setup:

var $api_key_list = array(
    array( 'id' => 1,'userid' => 'Quarter Share', 'key' => 'Nathan Lowell', 'desc' => '978-0982514542' )
);

Sample data return:

Array ( [0] => Array ( [id] => 1 [userid] => 1 [key] => 098f6bcd4621d373cade4e832627b4f6 [desc] => Test API key ) )

Query setup:

$api_key_list_query = "SELECT * from $wpapi_db_table_name";
$this->api_key_list =  $wpdb->get_results($api_key_list_query);

Query return:

Array ( [0] => stdClass Object ( [id] => 1 [userid] => 1 [key] => 098f6bcd4621d373cade4e832627b4f6 [desc] => Test API key ) [1] => stdClass Object ( [id] => 2 [userid] => 1 [key] => 098f6bcd4621d373cade4e832627b4f6 [desc] => Test API key 2 ) ) 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T20:47:24+00:00Added an answer on June 10, 2026 at 8:47 pm

    Adding the following solved my problem.

    $this->api_key_list = array();
    $i = 0;
    foreach($api_key_list_return as $obj) {
        foreach($obj as $key => $val) {
            $this->api_key_list[$i][$key] = $val;
        }
        $i++;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Following Script isn't working in CHROME browser, IE is Fine. I've changed opener.document ...
Following the spirit of this question , what should be the ideal way to
Following up on my earlier query , is there a way to specify the
Following is my code: <table border=0 align=center cellpadding=0 cellspacing=0 class=grid_table> <tr class=grid_caption><td class=grid_caption>Customer Name</td></tr>
Following are the features that my app is using: Screen layouts: SMALL NORMAL LARGE
Following on from this question what would be the best way to write a
Following up on this question, I'm working on a large Delphi 7 codebase which
Following on from the question asked by Mykroft Best way to handle input from
Following is the code which i am using to add events in my android
Following is the method adopted to upload file to specific folder using Gdrive V2

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.