예제 #1
0
파일: controller.py 프로젝트: five3/uplus
def get_article_one(id):
    sql = '''select articles.title, articles.content, articles.tags, articles.create_date, auth_user.username
               from articles, auth_user where articles.id=%s and articles.user_id=auth_user.id'''  % id
    # print sql
    return fetchone(sql)
예제 #2
0
def get_article_one(id):
    sql = '''select articles.title, articles.content, articles.tags, articles.create_date, auth_user.username
               from articles, auth_user where articles.id=%s and articles.user_id=auth_user.id''' % id
    # print sql
    return fetchone(sql)
예제 #3
0
파일: controller.py 프로젝트: five3/uplus
def get_pre_article(id):
    sql = '''select id, title
               from articles where id<%s limit 0,1'''  % id
    return fetchone(sql)
예제 #4
0
def get_pre_article(id):
    sql = '''select id, title
               from articles where id<%s limit 0,1''' % id
    return fetchone(sql)