New answers tagged

3 votes

Our php codes base has 6 different ways to do INSERT … ON DUPLICATE KEY UPDATE, how do I fix it?

There are at least two questions in your question: how do I fix the codebase? (ok, this is obvious: you pick a prefered method, then use your a text editor/IDE for refactoring the code and test the ...
Doc Brown's user avatar
  • 207k
2 votes

Best Practices for Storing Operational Hours Extending Past Midnight in MySQL

I've done this before and it's complex. You might have missed some edge case requirements Days longer than 24h Businesses with stores in different time zones. Daylight Savings where you have more ...
Ewan's user avatar
  • 75.8k
1 vote

Best Practices for Storing Operational Hours Extending Past Midnight in MySQL

The best solution will depend on the kind of query your database will need to answer typically. If a typical query is like "is this business open now"/"when does this business open/...
Bart van Ingen Schenau's user avatar

Top 50 recent answers are included