Hi, I would really appreciate help with this one:
db((db.table1.data == data) & (db.table2.table1_id ==
db.table1.id)).delete()
This condition works quite OK in a select, but how can I delete these
rows? Instead deleting the appropriate rows from both tables, py gives
me an "Unable to determine
I thought I'd go ahead and ask, and stop googling in vain...
Is there a way to rename a field in a select, e.g. as in
"SELECT SUM(column1) + SUM(column2) AS shortname ..."
Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the G
ger'),SQLField('b','integer'))
> >>> db.t.insert(a=2,b=3)
> 1
> >>> db.t.insert(a=3,b=7)
> 2
> >>> shortname=db.t.a.sum()+db.t.b.sum()
> >>> rows=db(db.t.id>0).select(shortname)
> >>> print rows[0]._extra[
I'm using 1.50, and tried the EXACT same code you provided as an
example...
On Nov 28, 2:31 am, mdipierro <[EMAIL PROTECTED]> wrote:
> which version do you have? Could you show me the exact code you are
> using?
>
> On Nov 27, 6:17 pm, Tari <[EMAIL PROTECTED]> wro
8, 3:34 pm, mdipierro <[EMAIL PROTECTED]> wrote:
> This is because of a bug fixed in 1.51. Replace
>
> print rows[0]._extra[shortname]
>
> with
>
> print rows[0]._extra[str(shortname)]
>
> and it should work.
>
> Massimo
>
> On Nov 28, 8:15 am, Tari <[EM
Hello, I'm still learning web2py, and have hit a wall once more:
I'd like to know if it is possible to call a function from a view, one
that would e.g. output a number of LI() helpers in a loop, and also
append a text string to the HTML.
I tried calling "response.write" from within a controller
Hello again,
Just a quick one:
Is there a way I could retrieve only the date part in a db operation?
Looking for a substitute for this:
dt = datetime.datetime.today()
db((db.table.posted.day() == dt.day) & (db.table.posted.month() ==
dt.month) & (db.table.posted.year() == dt.year) .select(...
Hello,
I'm using a separate py module (in the modules folder) for some of my
code. I understand that gluon objects must be explicitly imported,
since they are not globally visible as with controllers and models. I
had no problem with that except for the T().
Here's a sample code:
from gluon.htm
Hello again,
As I dive deeper and deeper into the (exciting) world of web2py, I
come to face increasingly tough challenges. I've searched and read the
discussions back and forth, yet could not find an acceptable solution
for my T() problem.
Suppose you have to translate this entire expression, t
t; cases you should use a prefix and a dictonary for your base language,
> too (since we don't have domains like gettext).
>
> On Jan 18, 7:50 am, mdipierro wrote:
>
> > I can think of other solutions but the one you propose seems the
> > simplest one.
>
>
Hello,
While going through my project output pages and validating them as
"XHTML 1.0 Strict" I've learnt that
SQLFORM creates a form with a table containing the DB labels and DB
form elements, which is XHTML compliant up to that point. What fails
the validation are the "_formkey" and "_formname"
e not, though :)
On Jan 20, 4:23 am, mdipierro wrote:
> Can you cut and paste an example of how the output should be?
>
> Thank you for pointing this out.
>
> Massimo
>
> On Jan 19, 9:06 pm, Tari wrote:
>
> > Hello,
>
> > While going through my project ou
Oh, by the way, the TBODY which appears in what I've pasted was
generated by Firefox.
Needless to say - it is by no means compulsory. That at least should
not give us a headache.
Alternatively, the "_action" can be inserted by hand, so that's not so
big a deal either. The
two input elements, howe
Oh, by the way, the TBODY which appears in what I've pasted was
generated by Firefox.
Needless to say - it is by no means compulsory. That at least should
not give us a headache.
Alternatively, the "_action" can be inserted by hand, so that's not so
big a deal either. The
two input elements, howe
14 matches
Mail list logo