1
0
mirror of https://github.com/gogf/gf.git synced 2025-04-05 11:18:50 +08:00
gf/.example/database/gdb/mysql/gdb_complecated.go
2021-10-11 21:41:56 +08:00

25 lines
353 B
Go

package main
import (
"github.com/gogf/gf/v2/frame/g"
)
func main() {
// error!
r, err := g.DB().Model("user").Where(g.Map{
"or": g.Map{
"nickname": "jim",
"create_time > ": "2019-10-01",
},
"and": g.Map{
"nickname": "tom",
"create_time > ": "2019-10-01",
},
}).All()
if err != nil {
panic(err)
}
g.Dump(r)
}