Android SQLite sending query as an email -
i wondering if possible send query via email created through app text file, or similar format can viewed on pc. query want send
public cursor getexpirydata (){ sqlitedatabase db = this.getwritabledatabase(); cursor expiry = db.rawquery("select * " + table_name + " " + col_4 + " between datetime('now', 'localtime') , datetime('now', '+30 days')", null ); return expiry; }
to retrieve data cursor, use piece of code:
if (cursor.movetofirst()){ do{ string data = cursor.getstring(cursor.getcolumnindex("data")); // ever want here }while(cursor.movetonext()); } cursor.close();
i don't know name of columns. can add table data in list of object , follow link send email tutorial.
thanks!
Comments
Post a Comment