Joe,

  I have a table(in my ER) 'questionary' with fields: (id, name,
created_date, description) a table 'questions'  with the fields (id,
id_questionary, number_question, question, answer). Well, in the field
number_question I want that in a "create operation" it receive your
last value + 1, for example:

   Questionary:
         id = 01
         Name = "blablabla"
         Created =  2009-09-30
         Description = 'more blablabla'

    Questions:
        id = 01
        Questionary = 01
        Question Number = 01
        Question = "How to do this ?"
        Answer = "I am a dummie !."

        id = 02
        Questionary = 01
        Question Number = 02 (get the last(max) value of this field +
1)
        Question = "How to do this again ?"
        Answer = "Oh ! my good !, really !, I am a dummie !."

     Well I think that can't be the value of field id because it's the
primary key of the table, then this is my problem !.

     ps: Sorry by my terrible english, I don't speak or write in
english. Google Tradutor is my friend.

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

Reply via email to