Hi there:
I am uploading files to my filesystem on the server and I am storing
these filenameswithin the database as an sqlobject. The class below
UploadedFile takes care of this.
"upload_user" takes in the name of the current logged in user and
stores it within the class. Thus I know which user has uploaded which
file.
Currently I am displaying all the files in the database using a line
such as
file_path = [myfile.filename for myfile in
UploadedFile.select(orderBy=UploadedFile.q.filename)]
However what I want to do is display only the files that the user has
uploaded (from the turbogears identity)
Thus i want to search the databse for the upload_user col and search
for the current user, and then display thier files.
class UploadedFile(SQLObject):
filename = StringCol(alternateID=True)
abspath = StringCol()
uniqueid = IntCol()
upload_user=StringCol()
I have recieved some help from others about using
relatedjoin/multiplejoin and foreign key to solve my problem. However
being new to sql I am not understanding how to use this to accomplish
what i want.
Perhaps someone could provide me with some more info??
Or perhaps show me a method to accomplish this.
Thankyou
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---