I am not very proficient with databases so I thought I would ask for your help with some code related to SQLite. I could have posted this in the B4j section as well but I thought it was easier here.
It is related to the B4xPushServer and my table-structure (with pseudo-values) is as follows:
This is the code I modified from the B4xPushServer:
In the quoted code, 'freqpref' will not work of course. Instead I need to read the value of 'freqpref' from the DB. Like this:
Can someone help with this code?
It is related to the B4xPushServer and my table-structure (with pseudo-values) is as follows:
B4X:
token = E6XXXXXXXXXXXXXXXXXXX
type = 1
updated_time = 1447672514961
freqpref = 180
B4X:
Dim rows As List = DBUtils.ExecuteMemoryTable(Main.db, _
"SELECT * FROM tokens WHERE updated_time > ?", _
Array As String (DateTime.Now + (freqpref*1000)), 0)
In the quoted code, 'freqpref' will not work of course. Instead I need to read the value of 'freqpref' from the DB. Like this:
B4X:
Dim rows As List = DBUtils.ExecuteMemoryTable(Main.db, _
"SELECT * FROM tokens WHERE updated_time > ?", _
Array As String (DateTime.Now + (180*1000)), 0)
Can someone help with this code?