I've got a working DAL connection that I can SELECT from.  I'm running
into a problem with an update like so:

db(db.feed.id == f.id).update(last_update=now)

The row isn't updating and I'm not getting any errors.  db._lastsql
shows this: "UPDATE feed SET last_update='2011-05-25 20:40:56' WHERE
(feed.id = 1);"  Which updates just fine in the MySQL console.

Any suggestions?

Matt

On May 25, 8:21 pm, mart <[email protected]> wrote:
> if you want to be light weight, you could also make a copy of dal.py
> and put it anywhere it could be referenced, maybe same folder if you
> want.
>
> then you can simply have this import
>
> from dal import DAL
> from dal import Field
>
> or in a folder structure that can be seen as a package by your script
>
> then you would simply do
>
> from folder1.folder2.dal import DAL
> from folder1.folder2.dal import Field
>
> Mart :)
>
> On May 25, 10:09 pm, Bruno Rocha <[email protected]> wrote:
>
>
>
>
>
>
>
> > Cool feature! Thanks. I am now planning to use it for a task queue based in
> > ActiveMQ.
>
> > web2py tagline is really 'improvements on every two weeks, or less'
> > --
> > Bruno Rocha
> > [ About me:http://zerp.ly/rochacbruno]
>
> > On Wed, May 25, 2011 at 10:43 PM, Massimo Di Pierro <
>
> > [email protected]> wrote:
> > > now you can do, from ANY python program
>
> > > from gluon import DAL
> > > db=DAL('sqlite://storage.sqlite',folder='applications/app/
> > > databases',auto_import=True)
> > > print db.tables
>
> > > auto_import = True will rebuild all tables WITHOUT executing the
> > > modules. Tables will have the right names, field names and field types
> > > but will not have the right attributes (default, widget, readable,
> > > writable, etc...) because they make no sense without an HTTP request.
> > > This is only thought to allow a script to perform inserts and selects.
>
> > > CAVEAT: this requires you run the app at least once using the new
> > > trunk code since requires the new metadata format. By running the app
> > > the *.table files are automatically converted to the new format.
>
> > > Give it a try. Let me know if you have ideas for improvements.
>
> > > Massimo
>
> > > P.S. More stuff coming soon. ;-)

Reply via email to