mirror of
https://gitee.com/johng/gf.git
synced 2024-12-05 05:37:55 +08:00
25 lines
350 B
Go
25 lines
350 B
Go
package main
|
|
|
|
import (
|
|
"github.com/gogf/gf/frame/g"
|
|
)
|
|
|
|
func main() {
|
|
// error!
|
|
r, err := g.DB().Table("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)
|
|
|
|
}
|