示例#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);
  }
示例#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);
  }
示例#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);
 }