If you do them as double percent signs ( '%%') then the python string
formatting will replace them with single percent signs.

On Fri, Jun 27, 2008 at 9:12 AM, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
>
> Hi.
>
> I want to do robust algorithm for searching in tables...the simplest
> example is with table with no relations:
>
> stmt = u'SELECT * FROM '
> stmt += str(b.clients.name)
> stmt += ' WHERE '
> for c in b.Client.c:
>  stmt += str(c)+' like \'%value%\' or '
>
> clients = session.query(Client).from_statement(stmt).all()
>
> There is one big problem using the '%' sign, because python is using
> it to replace values in string like:
> 'Welcom %s to my site' % 'john'
>
> Afterwards I want to search in tables with relations, like:
>
> session.query(Client).add_entity(Address)......
>
> Can anyone help me with this problem?
> What is the sqlalchemy way to make "multisearch" ??
>
> Thx in advance
> m_ax
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to