int g,s; Cursor cur3 = database2.rawQuery("select max(UnixTimeStamp) from Quote where EmoticonID=%d and SubCategoryID=%d",new String [] {g,s});
Cursor cur3 = database2.rawQuery("select max(UnixTimeStamp) from Quote where EmoticonID=? and SubCategoryID=?",new String [] {String.valueOf(g),String.valueOf(s)});