From 1f7cb554f32031665ea6d0900de5fe0f5e34d1d5 Mon Sep 17 00:00:00 2001 From: azw Date: Sun, 13 Aug 2023 15:46:28 +0800 Subject: [PATCH] 1 --- server/imserver/playermgr.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/server/imserver/playermgr.go b/server/imserver/playermgr.go index 2b01185b..a53edee0 100644 --- a/server/imserver/playermgr.go +++ b/server/imserver/playermgr.go @@ -24,6 +24,23 @@ func (this *PlayerMgr) init() { }) } }) + conn := q5.NewMysql( + mt.Table.GameDb.GetById(0).GetHost(), + mt.Table.GameDb.GetById(0).GetPort(), + mt.Table.GameDb.GetById(0).GetUser(), + mt.Table.GameDb.GetById(0).GetPasswd(), + mt.Table.GameDb.GetById(0).GetDatabase(), + ) + conn.Open() + rows, err := conn.Query("SELECT * FROM t_user") + if err == nil { + columns, err := rows.Columns() + if err == nil { + f5.GetSysLog().Info("mysql rows", columns) + } + } else { + f5.GetSysLog().Info("mysql error", err) + } } func (this *PlayerMgr) unInit() {