« first day (1992 days earlier)      last day (666 days later) » 

12:29 AM
@Kelthar I have not
@Kelthar pymysql.readthedocs.io/en/latest/user/examples.html "connection is not autocommit by default. So you must commit to save your changes."
that's a really weird choice for a mysql library to make
so yeah. It looks like when you get a new "cursor" the library is starting a transaction for you
and I expect you wouldn't see the queries that you run take effect until you commit that transaction
 
yeah, I was just implementing those changes in my code, thanks xD
I just needed to do: connection.autocommit(True)
 
Cool, glad it worked out :-)
 
 
3 hours later…
3:27 AM
@TehShrike , can I ask some help ... I am having this on my log.. Error: ER_LOCK_WAIT_TIMEOUT: Lock wait timeout exceeded; try restarting transactionUPDATE
I have no idea about that error
 
3:51 AM
is that the cause of updating every 5 seconds ? because I have script that will update each row where the address is null, then I update every 5 seconds...is this the cause ?
 
 
9 hours later…
1:13 PM
@jemz Probably not that script by itself, unless you're forgetting to close a transaction after the query
@jemz Either some other connection is holding a write lock on that row for longer than the timeout, or one or more other connections are holding read locks on that row that overlap with each other for that long
 
 
5 hours later…
6:34 PM
I have a basic schema going for relating products to platforms and setting platform-specific pricing as such i.imgur.com/3xwRqYH.png
From a high level, pricing is decided upon either by marking up cost or marking down msrp.
I'm wondering if this should be modeled at the database level.
So instead of storing the computed price value, store a markup decimal that can be either positive or negative.
Perhaps it's not 'instead of' but in addition to. I know I need to store the markup somewhere because I need to be able to retrieve it from the application.
 
 
2 hours later…
9:08 PM
@Qcom Yeah, I would say you at least need to store the markups that products could use in their own table
One question to consider: if these markups (maybe named something like "rubber spatulas bought at wholesale") change, is the price of all the existing products in those categories changed, or does that change only apply to new products added after that point?
having worked on inventory/point-of-sale software before, I would bet that users will need the ability to set custom prices for some products
 

« first day (1992 days earlier)      last day (666 days later) »