From 85058bd8473b723c71e877a5e236e471023bde2f Mon Sep 17 00:00:00 2001 From: mdipierro Date: Sun, 8 Dec 2013 09:33:30 -0600 Subject: [PATCH] fixed this issue http://stackoverflow.com/questions/20363043/web2py-dal-left-join-and-operator-precedence --- VERSION | 2 +- gluon/dal.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 3ea3d0a0..3798cc07 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.8.2-stable+timestamp.2013.12.08.08.24.55 +Version 2.8.2-stable+timestamp.2013.12.08.09.32.29 diff --git a/gluon/dal.py b/gluon/dal.py index 63f76304..b3dc64c3 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -2714,6 +2714,10 @@ class MySQLAdapter(BaseAdapter): self.execute('select last_insert_id();') return int(self.cursor.fetchone()[0]) + def select_limitby(self, sql_s, sql_f, sql_t, sql_w, sql_o, limitby): + return BaseAdapter.select_limitby( + self, sql_s, sql_f, '(%s)' % sql_t, sql_w, sql_o, limitby) + class PostgreSQLAdapter(BaseAdapter): drivers = ('psycopg2','pg8000')