On 7 Jul 2018, at 12:04pm, Cecil Westerhof <cldwester...@gmail.com> wrote:
> I went for the following solution:
> UPDATE selectRandom
> SET lastUsed = DATE('now', 'localtime')
> , lastUsedIdx = (
> SELECT IFNULL(MAX(lastUsedIdx), 0)
> FROM selectRandom
> WHERE lastUsed = DATE('now', 'localtime')
> ) + 1
> WHERE description = :teaToBrew
> I would think that is not to convoluted.
Elegant. I understood it. Though I was primed with what you're trying to do.
sqlite-users mailing list