Hello,
Does anybody could explain me how works select() or selectBy()
with multi criteria ?
a piece of my controller :
images = Attachement.select( AND( Attachement.q.message == msg.id,
Attachement.q.content_type.startswith( 'image' ) ) )
a piece of my model :
class Attachement(SQLObject):
filename = UnicodeCol(length=1024)
content_type = StringCol(length=1024)
filesize = IntCol()
message = ForeignKey('Message')
class Message(SQLObject):
message_id = StringCol(length=255, alternateID=True)
subject = UnicodeCol(length=1024)
content_type = StringCol(length=255)
mail_from = UnicodeCol(length=255)
mail_to = UnicodeCol(length=1024)
date = DateTimeCol(default=datetime.now)
size = IntCol()
kid = IntCol()
attachment = BoolCol(default=0)
transferts = MultipleJoin('Transfert')
attachements = MultipleJoin('Attachement')
My question is :
Which method should I use to list the attachments from 1 message AND
whose content_type col starting with 'image' ?
I hope i gave the informations you need to understand.
And sorry for my english! It's harder and harder to find my words...
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---