java. sql .SQLSyntaxErrorException, но все же все в моем коде кажется правильным - PullRequest
0 голосов
/ 14 апреля 2020
PreparedStatement pstmt = connection.prepareStatement(" insert into products (productname, category, age, "
                        + "gender, brand, colour, s, m, l, xl, offers, price, imagepath, imagename,addedby,time)"
                        + " values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,CURRENT_TIMESTAMP)");
                pstmt.setString(1, pojoproducts.getName());
                pstmt.setString(2, pojoproducts.getCategory());
                pstmt.setString(3, pojoproducts.getAge());
                pstmt.setString(4, pojoproducts.getGender());
                pstmt.setString(5, pojoproducts.getBrand());
                pstmt.setString(6, pojoproducts.getColour());
                pstmt.setString(7, pojoproducts.getS());
                pstmt.setString(8, pojoproducts.getM());
                pstmt.setString(9, pojoproducts.getL());
                pstmt.setString(10, pojoproducts.getXl());
                pstmt.setInt(11, pojoproducts.getOffers());
                pstmt.setInt(12, pojoproducts.getPrice());
                pstmt.setString(13, pojoproducts.getImagePath());
                pstmt.setString(14, pojoproducts.getImageName());
                pstmt.setString(15, pojoproducts.getAddedby());
                pstmt.executeUpdate();
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...