mirror of
https://gitee.com/johng/gf.git
synced 2024-12-05 05:37:55 +08:00
17 lines
249 B
Go
17 lines
249 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/gogf/gf/frame/g"
|
|
)
|
|
|
|
func main() {
|
|
if r, err := g.DB().Table("user").Where("uid=?", 1).One(); err == nil {
|
|
fmt.Println(r["uid"].Int())
|
|
fmt.Println(r["name"].String())
|
|
} else {
|
|
fmt.Println(err)
|
|
}
|
|
}
|