ashok.raavi told me try it like this:

        sql = "select * from %sentrys where tags like '%s%s%s'" % (tbx, "%",
tag, "%")
        # print >> web.debug, sql
        entrys = web.query(sql)

it debugs:
<type 'exceptions.TypeError'> at /tag/test
not enough arguments for format string
Python     C:\Python\Lib\site-packages\MySQLdb\cursors.py in execute, line
150
Web     GET http://127.0.0.1:8080/tag/test

On 10/14/07, Ken <[EMAIL PROTECTED]> wrote:
>
> # code.py
> entrys = web.select(tbx+'entrys', where='tags like \'%$tag%\'',
> vars=locals())
> ...
>
> i returns this sql:
>
> SELECT * FROM venus_entrys WHERE tags like '%%s%'
>
> y, it is not right. the $tag is not been returned.
> how can i get the right sql? 3Q
>
> --
> 每个人都有一片属于自己的森林, 迷失的人迷失了, 相逢的还会再相逢...
> Gtalk: iexper(at)gmail.com




-- 
每个人都有一片属于自己的森林, 迷失的人迷失了, 相逢的还会再相逢...
Gtalk: iexper(at)gmail.com

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to