January 6, 2024

Agent Trainer Ranks

[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 “

“;

foreach($result as $row)
{

echo ‘

‘;
echo ‘

‘;
echo ‘

‘;
echo ‘

‘;
echo ‘

‘;

$counter++;
}
echo “

Name Fans
‘ . $counter. ‘ ‘ . $row->name. ‘ ‘ . $row->rank. ‘

“;
}

[/insert_php]