Beispiel #1
0
  public static int insertIntoCart(String email, String productId, String appendNo, int quantity) {

    String insertSQL =
        "insert into cart"
            + "(email,productId,cartAppendNo,quantity) "
            + "values('"
            + email
            + "','"
            + productId
            + "','"
            + appendNo
            + "','"
            + quantity
            + "')";
    return DB.update(insertSQL);
  }
Beispiel #2
0
  public int insert() {
    // TODO Auto-generated method stub
    String insertSQL =
        "insert into cart"
            + "(email,cartAppendNo,productId,quantity) "
            + "values("
            + "'"
            + email
            + "','"
            + cartAppendNo
            + "', '"
            + productId
            + "','"
            + quantity
            + "');";

    System.out.println(insertSQL);

    return DB.update(insertSQL);
  }
Beispiel #3
0
 public int delete(String email2) {
   // TODO Auto-generated method stub
   String deleteSQL = "delete from cart " + "where email= '" + email2 + "'";
   System.out.println(deleteSQL);
   return DB.update(deleteSQL);
 }