FlashCardsProject/build/project/src/jf/flashcards/address/model/FlashCardDatabase.java
/**
	 * adds a new card entry to the specified table 
	 * called within FlashCardOverview through the add button
	 * @param table
	 * @param front
	 * @param back
	 * @return true if successful else false
	 */
adds a new card entry to the specified table
called within FlashCardOverview through the add button
@param table
@param front
@param back
@return true if successful else false
adds a new card entry to the specified table called within FlashCardOverview through the add button @param table @param front @param back @return true if successful else false
public static boolean addNewCardToStack(String table, String front, String back) {
		try {
			String addQuery = "INSERT INTO " + table.toLowerCase()
							 +"(id, front, back) VALUES(?,?,?)";
			PreparedStatement pstmt = db.prepareStatement(addQuery);
			pstmt.setString(1,null);
			pstmt.setString(2, front);
			pstmt.setString(3, back);
			pstmt.executeUpdate();
			pstmt.close();
			return true;
		}
		catch(Exception e)
		{
			System.err.println( e.getClass().getName() + ": " + e.getMessage() );
			return false;
		}
	}
public static boolean addNewCardToStack ( String table , String front , String back ) { try { String addQuery = "INSERT INTO " + table . toLowerCase ( ) + "(id, front, back) VALUES(?,?,?)" ; PreparedStatement pstmt = db . prepareStatement ( addQuery ) ; pstmt . setString ( 1 , null ) ; pstmt . setString ( 2 , front ) ; pstmt . setString ( 3 , back ) ; pstmt . executeUpdate ( ) ; pstmt . close ( ) ; return true ; } catch ( Exception e ) { System . err . println ( e . getClass ( ) . getName ( ) + ": " + e . getMessage ( ) ) ; return false ; } }
adds a new card entry to the specified table
 called within FlashCardOverview through the add button
 @param table
 @param front
 @param back
 @return true if successful else false
adds a new card entry to the specified table called within FlashCardOverview through the add button @param table @param front @param back @return true if successful else false