Example #1
0
  public static int deleteCardFromStack(String stackColumn) {
    int result = 0;
    String query = DatabaseQueries.deleteMaxdataFromStack.replaceAll("{0}", stackColumn);
    result = Database.modifyDataQuery(query);

    return result;
  }
Example #2
0
  public static int deleteAllCardFromStack(Stacks stackColumn) {
    int result = 0;
    String query = DatabaseQueries.deleteAlldataFromStack.replace("{0}", stackColumn.toString());
    System.out.println(query);
    result = Database.modifyDataQuery(query);

    return result;
  }
Example #3
0
  public static int insertCardToStack(Stacks stackColumn, int cardValue) {
    int result = 0;
    String query =
        DatabaseQueries.insertCardToStack
            .replace("{0}", stackColumn.toString())
            .replace("{1}", Integer.toString(cardValue));
    System.out.println(query);
    result = Database.modifyDataQuery(query);

    return result;
  }