mirror of
https://gitee.com/johng/gf.git
synced 2024-11-30 11:18:02 +08:00
18 lines
314 B
Go
18 lines
314 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/gogf/gf/frame/g"
|
|
)
|
|
|
|
func main() {
|
|
db := g.DB()
|
|
db.SetDebug(true)
|
|
result, err := db.Table("pw_passageway m,pw_template t").Data("t.status", 99).Where("m.templateId=t.id AND m.status = 0").Update()
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
fmt.Println(result.RowsAffected())
|
|
}
|