Thingse/app/src/main/java/com/daneshzaki/thingse/SQLAdapter.java
//insert a thing into the database
insert a thing into the database
insert a thing into the database
public long insertThing(String name, String price, 
    						String gift, String purchaseDate, 
    						String description,String picLocation)
    {    	
        ContentValues initialValues = new ContentValues();
        initialValues.put(KEY_NAME, name);
        initialValues.put(KEY_PRICE, price);
        initialValues.put(KEY_GIFT, gift);
        initialValues.put(KEY_PURCHASEDATE, purchaseDate);
        initialValues.put(KEY_DESCRIPTION, description);
        initialValues.put(KEY_PICLOCATION, picLocation);
        return db.insert(DATABASE_TABLE, null, initialValues);
    }
public long insertThing ( String name , String price , String gift , String purchaseDate , String description , String picLocation ) { ContentValues initialValues = new ContentValues ( ) ; initialValues . put ( KEY_NAME , name ) ; initialValues . put ( KEY_PRICE , price ) ; initialValues . put ( KEY_GIFT , gift ) ; initialValues . put ( KEY_PURCHASEDATE , purchaseDate ) ; initialValues . put ( KEY_DESCRIPTION , description ) ; initialValues . put ( KEY_PICLOCATION , picLocation ) ; return db . insert ( DATABASE_TABLE , null , initialValues ) ; }
insert a thing into the database
insert a thing into the database