The function that contains this does a lot of things, but nothing else 
regarding this table. And no values are not hard coded, just trying to find 
out the problem so I made it as simple as possible. 

If I look at the table in MySQL prompt is see that highest record ID is 
lets say 24030, I run the controller 10 times and look at the table again, 
still highest record is 24030. If I at this moment insert a record manually 
from MySQL prompt it'll get ID, 24041. 


Kenneth

Den tisdag 24 april 2018 kl. 04:16:34 UTC+3 skrev Anthony:
>
> Can we get more context? What does the real code look like (I assume you 
> don't really have a line at the top level of a controller file that inserts 
> the same hard-coded record on every request to the controller)? How are you 
> determining that no new records are inserted but the id is 
> auto-incrementing?
>
> Anthony
>
> On Sunday, April 22, 2018 at 6:55:18 PM UTC-4, Kenneth wrote:
>>
>> Hello,
>>
>> I can't understand this simple problem. 
>>
>> tracker = db.usage_tracker.insert(client = 6728, product_group = 2, 
>> product = 15)
>>
>> nothing appears in the database. ID counter is updated. If I look 
>> at db._lastsql I get 
>>
>> INSERT INTO usage_tracker(logged_in,product,client,product_group) VALUES 
>> ('2018-04-23 01:51:34.001992',15,6728,2);
>>
>> this is in a normal controller. 
>>
>> If I put the same tracker = db.usage_tracker.insert(client = 6728, 
>> product_group = 2, product = 15) in an own function in controller it works. 
>>
>>
>> Kenneth
>>
>>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to