Hi,
Below are the DAL query and its SQLite version, the bold expression was
always 1 (true) which made me think its not working?
recs = db(m.mt_account==184901310)(*m.name[:2] in
['cr','bu','se']*)(m.writetime
lastupdate)(m.name[-4:]=='LOTs').select(
Thanks Massimo,
Yes I changed the field type so I know why now.
On Monday, June 30, 2014 11:44:28 AM UTC+7, Pham Quang Dung wrote:
Can anyone explain to me what I did wrongly to have the unexpected string
test field, instead of double?
x=db().select(tb.searchvalue.with_alias('test'))
x[0
Can anyone explain to me what I did wrongly to have the unexpected string
test field, instead of double?
x=db().select(tb.searchvalue.with_alias('test'))
x[0]
Row {'test': u'3', '_extra': {'tb.searchvalue AS test': 3.0}}
--
Resources:
- http://web2py.com
- http://web2py.com/book
I wonder if there's a way we can use [1] like in row[r][1] instead of
row[r].fieldname? sometimes I must use this form of select which doesnot
allow aliases db(x).select('afield as f')
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py
(tb.tab.stringfield + db.tab.string2_field)
On Friday, June 20, 2014 5:25:19 AM UTC+7, Massimo Di Pierro wrote:
an you explain what you are trying to achieve? I am not sure from the
example.
On Tuesday, 17 June 2014 01:29:11 UTC-5, Pham Quang Dung wrote:
I am using SQLite and it appears
You are right Anthony, understood now.
Thanks Massimo for the warning as well.
On Saturday, May 31, 2014 8:07:33 PM UTC+7, Anthony wrote:
On Friday, May 30, 2014 7:59:01 PM UTC-4, Pham Quang Dung wrote:
Anybody enlighten me on while this form still updates the data? (I
expected
I am using SQLite and it appears no casting is available (or required?).
But I cannot perform a command like this:
db().select('test'+ db.tab.int_account)
can you show me the right syntax to make it happen?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
-
Niphlod,
where may we find the default call back? e.g for onvalidation? thanks
On Thursday, September 19, 2013 5:32:40 AM UTC+7, Niphlod wrote:
use always the same method. add a few logging lines between those lines of
code and see for yourself why your code isn't executed
On Wednesday,
(db.mytable).select(minus_5_min).first()
print row[minus_5_min]
Anthony
On Thursday, May 29, 2014 11:49:06 PM UTC-4, Pham Quang Dung wrote:
Hm,
Not true, I forgot to say I did with execlsql OK, for Sqlite,
select DATETIME((writetime), -5 minutes) from xxx
On Friday, May 30, 2014 2:35:42 AM
posting. from here onwards there is the documentation
about third-party modules and the execution environment of web2py.
http://web2py.com/books/default/chapter/29/04/the-core#Third-party-modules
On Thursday, May 29, 2014 12:40:43 PM UTC+2, Pham Quang Dung wrote:
I have placed an __init__.py
Anybody enlighten me on while this form still updates the data? (I expected
it was disabled to then use my own callback)
form = SQLFORM.smartgrid(db.anyinfo,onupdate=None
,constraints = dict(anyinfo =
(tb.name[6:]=='level'))
the result AFTER fetching the rows from the db.
On Thursday, May 29, 2014 12:32:41 PM UTC+2, Pham Quang Dung wrote:
I tried a query like *db().select(xx.writetime - timedelta(minutes=5)) *and
the result was totally a surprise because it was of type Int. Thoughts?
--
Resources:
- http
I have placed an __init__.py file in the folder (windows) of the controller
xyz.py but cannot import abc.py at the same location. Any hints to use path
+ file name, or copy the abc.py to where? I am newbee, sorry.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
-
Appreciate a simple hint if possible but I spent hours and could not trace
anywhere in the code where I could see how to modify the way
SQLForm.smartgrid takes a DB actions, such as save or delete.
The ultimate purpose is to customize the grid so that I donot need to click
View/Edit/Delete per
I tried a query like *db().select(xx.writetime - timedelta(minutes=5)) *and
the result was totally a surprise because it was of type Int. Thoughts?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
-
15 matches
Mail list logo