Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String vegetable_id = vegetable_idtxt.getText();
- int planting = Integer.parseInt(PlantingInstructionCodetxt.getText());
- int soiltype = Integer.parseInt(RecommendedSoilTypeCodetxt.getText());
- int sowing = Integer.parseInt(SowingInstructionCodetxt.getText());
- String besttimetosow = BestTimetoSowtxt.getText();
- String besttimetoharvest = BestTimetoHarvesttxt.getText();
- StringBuilder sql = new StringBuilder("INSERT INTO vegetables (vegetable_id,best_time_to_harvest,best_time_to_sow,planting_instruction_code,recommended_soil_type_code,sowing_instruction_code) VALUES (\'");
- sql.append(vegetable_id);
- sql.append("\',\'");
- sql.append(besttimetoharvest);
- sql.append("\',\'");
- sql.append(besttimetosow);
- sql.append("\',\'");
- sql.append(planting);
- sql.append("\',\'");
- sql.append(soiltype);
- sql.append("\',\'");
- sql.append(sowing);
- sql.append("\')");
- System.out.println( sql.toString() );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement