lib = $lib; $this->db = $this->lib->game->db; } public function run($player, $send) { $q = $this->db->query( "SELECT tech, " . ($send ? "send_to" : "player") . ", submitted, obeyed FROM tech_trade_order " . "WHERE " . ($send ? "player" : "send_to") . " = $player " . "FOR UPDATE" ); if (!dbCount($q)) { return array(null, null, null, null); } return dbFetchArray($q); } } ?>