Hi Fabio, On Tue, Feb 2, 2010 at 6:11 PM, Fabio Mascarenhas <mascaren...@acm.org>wrote:
> Hi, Ryan, > > Sorry, I made a mistake in my condition parser. Please replace line 329 > (simple <- ...) with > I think you meant line 293. simple <- %s* (%func <field> <op> '?') > -> apply %s* / %s* <field> <op> %s* > > and things should work again. :-) I am commiting this change to github. > This parser does not work for a query like this, but works with the old version. self:find_all( "created_at is not null", { order = "created_at desc", count = recentCount } ) It generates this SQL code: select * from visiondb_clip where created_at is not order by created_at desc Error message: /usr/local/rocks//orbit/2.0.2-1/lua/orbit/model.lua:160: LuaSQL: error executing query. MySQL: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order by created_at desc' at line 1 stack traceback: [C]: in function 'error' /usr/local/rocks//orbit/2.0.2-1/lua/orbit/model.lua:160: in function (tail call): ? (tail call): ? ./views.lua:29: in function '_recent' ./views.lua:93: in function '_sidebar' ./views.lua:153: in function <./views.lua:101> (tail call): ? (tail call): ? (tail call): ?/usr/local/rocks//orbit/2.0.2-1/lua/orbit/model.lua:160: LuaSQL: error executing query. MySQL: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order by created_at desc' at line 1 stack traceback: /usr/local/rocks//coxpcall/1.13.0-1/lua/coxpcall.lua:24: in function (tail call): ? (tail call): ? /usr/local/rocks//orbit/2.0.2-1/lua/orbit.lua:497: in function (tail call): ? (tail call): ? Thanks for your help. -- Regards, Ryan
_______________________________________________ Kepler-Project mailing list Kepler-Project@lists.luaforge.net http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project http://www.keplerproject.org/