Add row into specific row ID - Local DB

Hi all,

Currently struggling with adding a new row into a local db. The local db has column ‘time’ with values E.g. 3, 50, 102.

A new value of E.g. 38 is created within the app and I want to add it into the local db but between the 3 & 50 values.

Counting through the local db and applying the logic would be,
38 < 3 = Do not create a row
3 < 38 < 50 = Create row

However, the issue is once the row is created. It is at the bottom of the local db rows rather than between the 3 & 50 values.

Does anyone know how to create a new row within the local db between 2 values?

Many thanks,
:slight_smile: