修复小bug
parent
3e61016a3e
commit
302f63dcfe
|
@ -83,10 +83,10 @@ func GetArticles(c *gin.Context) {
|
||||||
is_public = 1
|
is_public = 1
|
||||||
}
|
}
|
||||||
sql = fmt.Sprintf("SELECT doc.id,doc.author,LEFT(doc.content,50) as content,doc.title,doc.type from doc where doc.type = %d and is_public = %d " +
|
sql = fmt.Sprintf("SELECT doc.id,doc.author,LEFT(doc.content,50) as content,doc.title,doc.type from doc where doc.type = %d and is_public = %d " +
|
||||||
"limit %d offset %d",is_public,req.Type,limit,offset)
|
"limit %d offset %d",req.Type,is_public,limit,offset)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
log.Print(sql)
|
||||||
e = db.GetMysqlClient().Query2(sql,&article)
|
e = db.GetMysqlClient().Query2(sql,&article)
|
||||||
if nil != e{
|
if nil != e{
|
||||||
logs.Error(e.Error(),sql)
|
logs.Error(e.Error(),sql)
|
||||||
|
|
Loading…
Reference in New Issue