how to get a specific data by using a string argument?

view story

http://stackoverflow.com – i am using this method to get the price of all item that has a category name value bt it is not showing anything... public long getcostmain(String xyz)throws SQLException { // TODO Auto-generated method stub String[] columns = new String[]{KEY_ROWID, KEY_CATEGORY,KEY_DATE,KEY_PRICE,KEY_DETAILS}; Cursor c = ourDatabase.query(DATABASE_TABLE, columns, KEY_DATE + "=" + xyz, null, null, null, null); long cost = 0; for(c.moveToFirst(); ! c.isAfterLast(); c.moveToNext()){ cost = cost + c.getLong(3); } retur (HowTos)