Hello guys,
I have a table Clients defined as (simplified version):
CREATE TABLE Clients (id INTEGER PRIMARY KEY AUTOINCREMENT, last_activity TEXT,
ping_timeout INTEGR);
each time a client performs an operation the last_activity column is updated
with:
UPDATE Clients SET last_activity=datetime('now','localtime') WHERE id=N;
ping_timeout was a global property so in order to get a list of all clients
timedout I used a query like (C code):
snprintf(sql, sizeof(sql), "select id from Clients where last_activity <
datetime('now', '-%d.00 seconds', 'localtime');", settings.ping_timeout);
things are recently changed in my app and ping_timeout is now a client property
set inside the Clients table (and no longer a global property), so I would like
to perform the query:
snprintf(sql, sizeof(sql), "select id from Clients where last_activity <
datetime('now', '-%d.00 seconds', 'localtime');", settings.ping_timeout);
using just the ping_timeout column in the Clients table instead of the
settings.ping_timeout global property.
Any idea?
--
Marco Bambini
http://www.sqlabs.com
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users