1234567891011121314151617181920 |
- package models
- import "rdluck_tools/orm"
- func GetLongzhonginfoByClassifyId(classifyId int) (items []*Longzhonginfo, err error) {
- sql := `SELECT * FROM longzhonginfo WHERE classify_id=? ORDER BY longzhonginfo_id ASC `
- o := orm.NewOrm()
- o.Using("edb")
- _, err = o.Raw(sql, classifyId).QueryRows(&items)
- return
- }
- func GetLongzhongpriceinfoByClassifyName(productName string) (items []*Longzhongpriceinfo, err error) {
- sql := `SELECT * FROM longzhongpriceinfo WHERE product_name=? ORDER BY longzhongpriceinfo_id ASC `
- o := orm.NewOrm()
- o.Using("edb")
- _, err = o.Raw(sql, productName).QueryRows(&items)
- return
- }
|