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
def getmsg(id): return _db.get('select * from `msg` where id=%s' % id)
def getreply(re_id): return _db.get('select * from `reply` where id=%s' % re_id);
def getmsg(id): return _db.get('select * from `msg` where id=%s' % id);
def getmsg(id): return _db.get("select * from `msg` where id=%s" % id)
def getreply(re_id): return _db.get('select * from `reply` where id=%s' % re_id)