Thanks for the tip on writing the queries and the info about POST w/
redirect.
I did a bit more checking and this is what I found:
>>> web.select('meta_data_music', what='*', where='post_id=$post_id',
>>> vars=locals(), _test=1)
<sql: 'SELECT * FROM meta_data_music WHERE post_id=1'>
>>> web.select(u'meta_data_music', what='*', where='post_id=$post_id',
>>> vars=locals(), _test=1)
<sql: 'SELECT * FROM m, e, t, a, _, d, a, t, a, _, m, u, s, i, c WHERE
post_id=1'>
So, it just doesn't like unicode objects.
-dougal
On Sep 3, 7:55 am, "Aaron Swartz" <[EMAIL PROTECTED]> wrote:
> > Gives me an error because it tries to explode the string from the
> > variable 'table' into a series of table names. So it's trying to
> > "SELECT * FROM m, e, t, a, _,..."
>
> Really? I'm guessing that some how table became a list then.
>
> >>> web.select('table', what='*', _test=1)
>
> <sql: 'SELECT * FROM table'>>>> web.select(list('table'), what='*', _test=1)
>
> <sql: 'SELECT * FROM t, a, b, l, e'>
>
> And the better way to write your query is:
>
> web.select(table, where='post_id=$post_id', vars=locals())
>
> > Secondly, is there a way to send POST data with a web.redirect() call?
>
> I don't think that's possible in HTTP.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---