Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void SearchDrink() {
- String query = "SELECT * FROM wafflehouse.drinkorders WHERE orderID ='"+idOrder+"'";
- try{
- pst=conn.prepareStatement(query);
- rs=pst.executeQuery();
- if(!rs.next()){
- } else {
- do {
- int id = Integer.valueOf(rs.getString("drinkOrderID"));
- drink = id + 1;
- } while(rs.next());
- }
- AddDrink();
- } catch(SQLException e){
- JOptionPane.showMessageDialog(null, e);
- }
- }
- public void SearchCart() {
- String query = "SELECT * FROM wafflehouse.order";
- try{
- pst=conn.prepareStatement(query);
- rs=pst.executeQuery();
- while (rs.next()){
- int id = Integer.valueOf(rs.getString("orderID"));
- idOrder = id + 1;
- }
- AddCart();
- } catch(SQLException e){
- JOptionPane.showMessageDialog(null, e);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement