From df11f297d5b29dd5975874a2e2de5c88c3a61592 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 10 Jun 2022 12:59:51 +0800 Subject: [PATCH] 1 --- .../controller/TempToolsController.class.php | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/webapp/controller/TempToolsController.class.php b/webapp/controller/TempToolsController.class.php index 9d189086..ada4af59 100644 --- a/webapp/controller/TempToolsController.class.php +++ b/webapp/controller/TempToolsController.class.php @@ -173,4 +173,46 @@ class TempToolsController extends BaseController { } } + public function exportData() + { + $type = getReqVal('type', ''); + if ($type == 1) { + $this->exportData1(); + } else if($type == 2) { + $this->exportData2(); + } + } + + public function exportData1() + { + $type = getReqVal('type', ''); + $accounts = array(); + $conn = myself()->_getMysql(''); + { + $rows = $conn->execQuery( + 'SELECT * FROM t_battle', + array( + ) + ); + echo 'account_id' . "\n"; + foreach ($rows as $row) { + $channel = phpcommon\extractChannel($row['account_id']); + if ($channel == 6516) { + echo $row['account_id'] . "\n"; + } + } + } + } + + public function exportData2() + { + echo 'account_id' . "\n"; + foreach ($rows as $row) { + $channel = phpcommon\extractChannel($row['account_id']); + if ($channel == 6516) { + echo $row['account_id'] . "\n"; + } + } + } + }