I don't know if this is a good way to do it (I don't know how it's
performance is compared to other methods)... But something like the
following should work...

result = [record for record in Tipolmovel.select() if
record.description.startswith('house')]

On 9/26/07, Leandro Severino <[EMAIL PROTECTED]> wrote:
>
> Well,
>     I have a method to search values in a table.
>
>     The source:
>
>     def search(self, *args, **kwargs):
>         mode = "search"
>         sigla=kwargs["sigla"]
>         descricao=kwargs["descricao"]
>         if sigla:
>                 tipos=TipoImovel.selectBy(sigla=sigla)
>         else:
>                 if descricao:
>                         tipos = TipoImovel.selectBy(description=descricao)
>         return dict(tipos=tipos, mode=mode)
>
>     I want 'search' a description where that startswith with a
> specific string, for example, select all records from "TipoImovel"
>  where the description LIKE house%, then the query return all records
> with de column "description" startswith "house".
>
>     How to do this ?
>
>
> >
>


-- 
kv. Halldór Rúnarsson

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to