func ExecuteQuery(cmd string) (*Results, error) {
	rows, err := sqlDb.Connection.Query(cmd)
	if err != nil {
		return nil, err
	}
	defer rows.Close()
	cols, err := rows.Columns()
	if err != nil {
		return nil, err
	}
	if cols == nil {
		return nil, nil
	}
	var results Results
	results.Columns = cols
	results.Data = make([][]string, 0)
	vals := make([]interface{}, len(cols))
	for i := 0; i < len(cols); i++ {
		vals[i] = new(interface{})
	}
	rowCount := 1
	for rows.Next() {
		err = rows.Scan(vals...)
		if err != nil {
			fmt.Println(err)
			continue
		}
		rowSlice := make([]string, len(cols))
		for i := 0; i < len(vals); i++ {
			rowSlice[i] = printValue(vals[i].(*interface{}))
		}
		rowCount++
		results.Data = append(results.Data, rowSlice)
	}
	if rows.Err() != nil {
		return nil, rows.Err()
	}
	return &results, nil
}
ExecuteQuery Run the provided command and return the results in a 2 dimensional slice
where slice[0] are column names, and all other slices are the resulting rows
package database
import (
	"database/sql"
	"fmt"
	"os"
	"strings"
	"time"
)
type SQLDatabase struct {
	Connection *sql.DB
}
type Results struct {
	Columns []string
	Data    [][]string
}
var sqlDb SQLDatabase
func GetConnection() (bool, error) {
	if sqlDb.Connection != nil {
		err := sqlDb.Connection.Ping()
		if err != nil {
			return false, err
		}
		return true, nil
	}
	userid := os.Getenv("DATABASE_USERNAME")
	password := os.Getenv("DATABASE_PASSWORD")
	server := os.Getenv("DATABASE_SERVER")
	database := os.Getenv("DATABASE_NAME")
	dsn := "server=" + server + ";user id=" + userid + ";password=" + password
	if len(database) != 0 {
		dsn += ";database=" + database
	}
	fmt.Println(dsn)
	connection, err := sql.Open("mssql", dsn)
	if err != nil {
		return false, err
	}
	err = connection.Ping()
	if err != nil {
		return false, err
	}
	sqlDb = SQLDatabase{Connection: connection}
	return true, nil
}