def POST(self, page = 1): spost = web.input(s = '') skey = spost.s skey = skey.encode("utf-8") pagestr = '' posts = model.execSql("select * from " + tablename("Posts") + " where post_title like '%" + skey + "%'") R.common_data() return R.render('index', posts = posts, pagestr = pagestr)
def POST(self): spost = web.input(execsql = '') execsql = '' if spost.execsql: execsql = spost.execsql results = model.execSql(execsql) return render.sql(execsql, results)
def POST(self): spost = web.input(execsql='') execsql = '' if spost.execsql: execsql = spost.execsql results = model.execSql(execsql) return render.sql(execsql, results)
def POST(self, page=1): spost = web.input(s='') skey = spost.s skey = skey.encode("utf-8") pagestr = '' posts = model.execSql("select * from " + tablename("Posts") + " where post_title like '%" + skey + "%'") R.common_data() return R.render('index', posts=posts, pagestr=pagestr)
def POST(self): spost = web.input(execsql = '') execsql = '' if spost.execsql: execsql = spost.execsql results = model.execSql(execsql) for r in results: print r for t in r: print t return render.data(execsql, results)
def POST(self): spost = web.input(execsql='') execsql = '' if spost.execsql: execsql = spost.execsql results = model.execSql(execsql) for r in results: print r for t in r: print t return render.data(execsql, results)