PDA

View Full Version : How to get updated rows from a table (SqLite) with time stamp.



meena
12th May 2010, 11:03
Hi wanted to check
What is the Query to get the updates from the table (updated (added, edited, deleted row information) rows from last 5 mins/1 hour/5 hours/24 hours.)

like for example

SELECT * FROM ORDERS
WHERE ROW CHANGE TIMESTAMP FOR ORDERS >
CURRENT TIMSTAMP - 24 HOURS;
returns all the rows that have been changed in the last day


Thank you

victor.fernandez
12th May 2010, 16:16
You should ask that question on some SQLite forum or mailing list. For example the sqlite-users mailing list (http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users).

JD2000
12th May 2010, 18:48
You may want to have a look at this http://www.sqlite.org/lang_datefunc.html and to make your query slightly more versatile you can bind the time variable http://doc.trolltech.com/4.6/qsqlquery.html.