Book says check_reserved defaults to None but "welcome" app specifies "all":
https://github.com/web2py/web2py/blob/master/applications/welcome/models/db.py#L34
Can I safely switch that to None or ['']?
Doesn't/Couldn't the DAL escape everything so this would not ever be an
issue?
--
Resourc
Wow, thanks!
The rname parameter of Field solved the problem.
2017-10-27 6:14 GMT-02:00 Nico de Groot :
> No, that just changes how the DAL checks for conflicts with reserved SQL
> words. It depends on the backend which words are problematic. See the book.
> If you really want to use a reserved
No, that just changes how the DAL checks for conflicts with reserved SQL words.
It depends on the backend which words are problematic. See the book. If you
really want to use a reserved word check out the rname parameter of Field.
Nico de Groot
--
Resources:
- http://web2py.com
- http://web2p
Hi
this should help:
http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Reserved-keywords
I think check_reserved=['common'] will solve the problem
On Thursday, October 26, 2017 at 10:56:45 PM UTC+3, Fabiano Almeida wrote:
>
> Hi!
>
> How to put in the DAL a legacy t
In Time:
I'm working with MySQL.
Em quinta-feira, 3 de outubro de 2013 14h40min37s UTC-3, Ari Lion BR Sp
escreveu:
>
> Hi,
>
> I have a Legacy table with string primary key.
> seems to bel web2py is not able to handle only the records containing
> alphanumeric charachters . For those containing
I built a *grid *for listing records for this table (in this case, Products
table) and all work well, it means, *on clickin on button* of *SQLFORM.grid*
for edditing , as below
[image: Imagem inline 1]
all works well
[image: Imagem inline 2]
including master / details that we set (ie, the
this happens when you try to do what exactly ?
On Thursday, October 3, 2013 7:40:37 PM UTC+2, Ari Lion BR Sp wrote:
>
> Hi,
>
> I have a Legacy table with string primary key.
> seems to bel web2py is not able to handle only the records containing
> alphanumeric charachters . For those containing
OK, I think I may have found the answer.
The legacy definition is:
CREATE TABLE `users_to_landlords` (
`user_id` smallint(6) NOT NULL DEFAULT '0',
`landlord_id` smallint(6) NOT NULL DEFAULT '0',
`prop_id` smallint(8) NOT NULL DEFAULT '0',
PRIMARY KEY (`user_id`,`landlord_id`,`prop_id`)
)
Thanks Danes and Bruno...
That's what I needed
On Dec 31 2010, 5:28 pm, Bruno Rocha wrote:
> If I understood well you need to do:
>
> person = db.define_table('another_name',Field(...),Field(...),migrate=False)
>
> so you have 'person' object.
>
> person.insert(name='blablabla')
>
> rows
You don't have to rename the table.
You can use
db.another_name.insert(name="Box")
On Dec 31, 12:39 pm, Marcello wrote:
> Thanks Danes,
>
> But this is not the problem. The table has an ID.
> The problem is that I can't rename the table, and it's name is
> "another_name"
>
> And I want to do so
Thanks Danes,
But this is not the problem. The table has an ID.
The problem is that I can't rename the table, and it's name is
"another_name"
And I want to do something like:
db.product.insert(name="Box")
Thanks,
Marcello
On Dec 31, 3:03 pm, DenesL wrote:
> Hi Marcello.
>
> if your table ha
Hi Marcello.
if your table has an auto-increment integer field you can do:
db.define_table('another_name',Field('the-auto-inc-field','id'), ...)
if not then sorry, no one has contributed the keyed table support for
mysql, see:
http://web2py.com/book/default/chapter/06#Legacy-Databases-and-Keyed-
12 matches
Mail list logo