

[insert_php]
global $wpdb;
$result = $wpdb->get_results(“SELECT name,rank FROM wp_agent_trainer ORDER BY rank DESC LIMIT 50”);
if ( $result ) {
$counter = 1;
echo “
Name | Fans | |
---|---|---|
‘ . $counter. ‘ | ‘ . $row->name. ‘ | ‘ . $row->rank. ‘ |
“;
}
[/insert_php]