コード例 #1
0
ファイル: url_short.py プロジェクト: zhourongyu/DotaNews
def url_short_new(url):
    id = _db.get( 'select `id` from url_short where url=%s limit 1', url)
    if id:
        id = id.id
    else:
        id = _db.execute( 'insert into `url_short` (url) values (%s)', url)
    return id
コード例 #2
0
def getmsg(id):
    return _db.get('select * from `msg` where id=%s' % id)
コード例 #3
0
ファイル: foo.py プロジェクト: 42qu/zqa
def getreply(re_id):
    return _db.get('select * from `reply` where id=%s' % re_id);
コード例 #4
0
ファイル: foo.py プロジェクト: 42qu/zqa
def getmsg(id):
    return _db.get('select * from `msg` where id=%s' % id);
コード例 #5
0
ファイル: foo.py プロジェクト: 42qu/znote
def getmsg(id):
    return _db.get("select * from `msg` where id=%s" % id)
コード例 #6
0
def getreply(re_id):
    return _db.get('select * from `reply` where id=%s' % re_id)