View definition

(RawSeter).QueryRows

Defined in github.com/astaxie/beego/orm/types.go

Description

query data rows and map to container

var ids []int
var names []int
query = fmt.Sprintf("SELECT 'id','name' FROM %suser%s", Q, Q)
num, err = dORM.Raw(query).QueryRows(&ids,&names) // ids=>{1,2},names=>{"nobody","slene"}