Skip to content

Instantly share code, notes, and snippets.

@muskie9
Created February 3, 2017 15:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save muskie9/193b3c8c165cb4db3dabd371b4c71983 to your computer and use it in GitHub Desktop.
Save muskie9/193b3c8c165cb4db3dabd371b4c71983 to your computer and use it in GitHub Desktop.
<?php
public function Leaderboard() {
$databaseConfig2 = array(
'type' => 'MySQLDatabase',
'server' => 'localhost',
'username' => 'username',
'password' => 'password',
'path' => '',
'database' => 'silverstripe715'
);
DB::connect($databaseConfig2);
$leaders = Leader::get();
global $databaseConfig;
DB::connect($databaseConfig);
return $leaders;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment