[web2py] empty record (data) set

2011-03-12 Thread Adnan S.
I wanted to create an empty data set, just to get the table structure, but to avoid returning any records, due to large size of the table. I'm using the MySQL and if I do it as bellow, seems that everything goes into an infinite loop, where I thought it will just be as SELECT * from Prod WHERE 1=0

[web2py] Re: empty record (data) set

2011-03-12 Thread Adnan S.
Thanks Vasile! I'm making baby steps here :) On Mar 12, 5:15 pm, Vasile Ermicioi wrote: > 1==0 is a boolean not a query, > > empty_result = db(db.prod.id<0).select() # I suppose that you don't have > negative ids :)

[web2py] Re: empty record (data) set

2011-03-13 Thread Adnan S.
en the best way to see what's going on... > > e.g.  db(db.prod.id<0)._select() > > On Mar 13, 12:37 am, "Adnan S." wrote: > > > Thanks Vasile! I'm making baby steps here :) > > > On Mar 12, 5:15 pm, Vasile Ermicioi wrote: > > > > 1

[web2py] NameError: global name \'db\' is not defined\n

2011-03-14 Thread Adnan S.
Got this error and trying to understand what happened... I deployed the app to the server (copy/paste folder) and it worked well, but after couple hours the part related to the db, out of a sudden stopped working... The same app still works on the local computer, and is accessing the same remote M

[web2py] return xml list

2011-03-15 Thread Adnan S.
I used the code that Massimo posted for returning the xml, which works perfectly fine when exporting from a single table, but when selecting fields from two tables it gets stuck, due to table names propagated in the resultset. Being a newbie w web2py and python I'm not finding an elegant solution a

[web2py] Re: return xml list

2011-03-16 Thread Adnan S.
Maybe I should ask instead, can anyone please point me in the right direction, to find out a proper way to export the xml file when joining 2 tables, and want only several fields in the xml file? Thanks. On Mar 15, 10:25 pm, "Adnan S." wrote: > I used the code that Massimo posted

[web2py] Re: return xml list

2011-03-16 Thread Adnan S.
o not need a view > > On Mar 16, 2:33 pm, "Adnan S." wrote: > > > Maybe I should ask instead, can anyone please point me in the right > > direction, to find out a proper way to export the xml file when > > joining 2 tables, and want only several fields in t