package main
import (
_ "github.com/go-sql-driver/mysql"
"github.com/go-xorm/xorm"
"fmt"
)
type Db_row struct {}
func main(){
e,err:=xorm.NewEngine("mysql","root:root@tcp(192.168.25.120)/db_glass_local_order?charset=utf8" )
if err != nil{
fmt.Println(err)
return
}
e.Sync2(new(Db_row))
sql := "select * from tb_local_order"
r,err:=e.QueryString(sql)
if err != nil{
fmt.Println(err)
return
}
fmt.Println(r)
}
import (
_ "github.com/go-sql-driver/mysql"
"github.com/go-xorm/xorm"
"fmt"
)
type Db_row struct {}
func main(){
e,err:=xorm.NewEngine("mysql","root:root@tcp(192.168.25.120)/db_glass_local_order?charset=utf8" )
if err != nil{
fmt.Println(err)
return
}
e.Sync2(new(Db_row))
sql := "select * from tb_local_order"
r,err:=e.QueryString(sql)
if err != nil{
fmt.Println(err)
return
}
fmt.Println(r)
}