-
-
Save muskie9/c05d327046c986eb5cc6616d3933c440 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function getLeaders() { | |
global $databaseConfig, $databaseConfig2; | |
DB::connect($databaseConfig2);// connect to DB 2 | |
$query = DB::Query("SELECT * FROM leader"); | |
$arrayList = ArrayList::create(); | |
foreach ($query as $row){ | |
$arrayList->push(ArrayData::create($row)); | |
} | |
DB::connect($databaseConfig);// when done, switch back to the regular DB | |
return $arrayList; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment