Fix typo in README

This commit is contained in:
Jinzhu 2014-06-13 10:54:37 +08:00
parent 938618a3e2
commit 8be30beee9
1 changed files with 2 additions and 2 deletions

View File

@ -865,10 +865,10 @@ db.Debug().Where("name = ?", "jinzhu").First(&User{})
Row & Rows is not chainable, it works just like `QueryRow` and `Query`. Row & Rows is not chainable, it works just like `QueryRow` and `Query`.
```go ```go
row := db.Table("users").Where("name = ?", "jinzhu").select("name, age").Row() // (*sql.Row) row := db.Table("users").Where("name = ?", "jinzhu").Select("name, age").Row() // (*sql.Row)
row.Scan(&name, &age) row.Scan(&name, &age)
rows, err := db.Model(User{}).Where("name = ?", "jinzhu").select("name, age, email").Rows() // (*sql.Rows, error) rows, err := db.Model(User{}).Where("name = ?", "jinzhu").Select("name, age, email").Rows() // (*sql.Rows, error)
defer rows.Close() defer rows.Close()
for rows.Next() { for rows.Next() {
... ...