Hi All,
I have table with a field that I don't want to show to the user
however, I do want to set it to a value I receive in a (well vetted)
get request. To this end I am calling SQLFORM with the list of fields
I want rendered and deliberately missing that one out.
I have tried storing the value
Cool, thanks :-)
On Apr 10, 6:13 pm, mdipierro wrote:
> db(db.name.like('%alex%)).select()
>
> On Apr 10, 4:04 pm, "web2py <<>> technicalbloke.com"
>
> wrote:
> > I can't seem to find a clear example of using 'like' in database
&
I can't seem to find a clear example of using 'like' in database
selects.
I'd like to do something like...
SELECT * FROM `customers` WHERE customer.name LIKE "%alex%" LIMIT 10;
...but without resorting to executing the query directly via
db.executesql(). The manual says...
"You can build a que
t; migration even if there was data in there that is not of type
> 'datetime'. You need to clean up that column.
>
> In your model do this
>
> db(db.youtable.id>0).update(thedatetimefield=None)
>
> run appadmin once than remove the above line.
>
> Massimo
>
uon/sql.py", line 2170, in xml
return sqlhtml.SQLTABLE(self).xml()
File "/rahrahrah/web2py/gluon/sqlhtml.py", line 605, in __init__
for (rc, record) in enumerate(sqlrows):
File "/rahrahrah/web2py/gluon/sql.py", line 2127, in __iter__
yield self[i]
File
Hi,
Somehow (don't ask me how!) I've managed to bork my database :-/
Appadmin let's me see all my tables except one, when I click on it's
name it spews the message below. I don't care about the data inside,
I'd just like to have my database rebuilt from the model so what's the
best way to do that
Hi Steve,
Erm, I'm not sure, I'm manually updating each field after verification
so I guess you can update whatever you like there, I'm pretty new to
this though so apologies if I'm missing your point! One of the issues
that arises when trying to do this, as Massimo correctly predicted
above, is
Race condition, whoops!
Thanks for that Massimo, I knew that should be in there somewhere! :-)
On Apr 4, 3:23 pm, "web2py <<>> technicalbloke.com"
wrote:
> OK, so I just cobbled this together and it seems to work though I'm
> sure not in all cases...
>
>
", DBINPUT(db.EMAIL_ADDRESSES.email_address),
DBINPUT(db.EMAIL_ADDRESSES.the_default), "(set as default)" ),
TR( "", INPUT(_type='submit',_value='SUBMIT') )
) )
Is there an easier/better way I can do this? If not, comments and
ering on BTW, I'm very excited by web2py - I've wanted
to ditch PHP for Python for years and I'm hoping this is the framework
that will allow me to do that! :)
Roger.
On Apr 4, 12:39 pm, "web2py <<>> technicalbloke.com"
wrote:
> Or is there a way to create s
Or is there a way to create something akin to an old fashioned
'database view' in the model, get SQLFORM to render that and then in
the controller validate the fields and insert/update the fields
manually?
Roger.
On Apr 4, 12:23 pm, "web2py <<>> technicalbloke.com
I see that it's non-trivial but maybe 1,3 and 4 could be negated by
using the following syntax (2 I'm not so sure about)...
COMPOUNDFORM( db.TABLE1,db.TABLE2, db.TABLE3, fields=
[ db.TABLE1.name, db.TABLE2.email, db.TABLE3.phone ], relations
[ db.TABLE1.id==db.TABLE2.contact_id,
db.TABLE1.id==db
12 matches
Mail list logo