How to connect to the database inside a table?

Hello!

I am trying to connect to the database inside a table to use another table. This is possible? Any help or recommendation I would appreciate very much, thank you very much in advance!

Hello, here’s what I’ve been doing:

        import "github.com/GoAdminGroup/go-admin/modules/db"

        // ...
        conn := ctx.UserValue["user"].(models.UserModel).Base.Conn

	rows, err := db.WithDriverAndConnection("my_connection", conn).
		Table("table_name").
		Select("*").
		All()