# Path: config/setting.py



from config.setting import db
#encoding=utf-8

def get_by_id(id):
    row = db.select("author",what="id,name",where="id=$id",vars={"id":id})
    if row:
        return row[0]
    else:
        return None

def has(name):

# Path: config/setting.py



# Path: model/author.py
from config.setting import db

#encoding=utf-8

def get_by_id(id):
    row = db.select("author",what="id,name",where="id=$id",vars={"id":id})
    if row:
        return row[0]
    else:
        return None

def has(name):

    row = db.select("author",where="name=$name",vars={"name":name});