You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import(
"database/sql"
_ "github.com/go-sql-driver/mysql"
)
func DBQuery() []map[string]string{
var db *sql.DB
var err error
db, err = sql.Open("mysql", dbServer) //dbServer is my local mysql database
str:=call user_list(); //user_list() is a procedure of mysql database,it return the list of all user
rows,err:=db.Query(str)
if err!=nil{
fmt.Println("err=",err)
}
}
where i call this function ,the error is:Error 1312: PROCEDURE mytestdb.user_list can't return a result set in the given context
this function can work on win7 64bit and centos 64bit system,but it can not work on ubuntu 14.04 64bit system
The text was updated successfully, but these errors were encountered:
import(
"database/sql"
_ "github.com/go-sql-driver/mysql"
)
func DBQuery() []map[string]string{
var db *sql.DB
var err error
db, err = sql.Open("mysql", dbServer) //dbServer is my local mysql database
str:=
call user_list();
//user_list() is a procedure of mysql database,it return the list of all userrows,err:=db.Query(str)
if err!=nil{
fmt.Println("err=",err)
}
}
where i call this function ,the error is:Error 1312: PROCEDURE mytestdb.user_list can't return a result set in the given context
this function can work on win7 64bit and centos 64bit system,but it can not work on ubuntu 14.04 64bit system
The text was updated successfully, but these errors were encountered: