Hi,

I´ve a table called project and i have another table called
projectfile. How can i reference automaticlly the project.id in the
table projectfile?

this is my code, but it`s wrong:

db.define_table('projectfile',
                SQLField('projectid', default=project.id,
writable=False, readable=False),
                SQLField('filename'),
                SQLField('format'),
                SQLField('file','upload'),
                SQLField('cdate','date',default=now),
                SQLField('description','text'))
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" 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/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to