On Friday, January 6, 2017 at 8:08:14 AM UTC-5, Anthony wrote:
>
> On Thursday, January 5, 2017 at 11:18:46 PM UTC-5, Leonardo Dutra wrote:
>>
>> Hi guys, 
>> I need to create a table in my db from a controller, such as:
>> I have my controller and after to submit a form it will create a new 
>> table automatically, it's possible?
>> If they have better suggestions, please feel free to tell me!
>>
>
> What do you then need to do with the table? Assuming it needs to be 
> accessed from other parts of your code, you will need to save the metadata 
> used to create it and re-define it dynamically wherever needed.
>

Note, you could store the submitted form data in the database (or 
somewhere), and then in a model (or someplace where these models are 
needed), you could include code to programmatically define the tables based 
on the stored metadata (possibly only defining particular tables, depending 
on the request). Hard to say, though, without knowing more about your use 
case.

Anthony

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to