title: How can I update the ID of an entity in mysql through DAO?
body: <p>//Here's my code in my AccountDAO</p>
  
  <pre><code>@Override
      public void editAccount(Accounts account) throws ErrorException {
  
              response = FAILED;
              Connection connection = null;
              PreparedStatement pStatement = null;
              String sql = "UPDATE all_accounts SET 
                           accountID=?,accPassword=?,accStatus=?"
                           + "WHERE accountID "+ account.getAccountID();
              ResultSet resultSet = null;
          try {    
                  if(manager == null){
                         manager = (DBManager) 
                                   DBManagerImplementation.getInstance();
              }
  
              connection = manager.getConnection();
              pStatement = connection.prepareStatement(sql);
  
              pStatement.setString(1, account.getPassword());
              pStatement.setString(2, account.getStatus());
  
              pStatement.execute();
          } catch (SQLException ex) {
              System.out.println("Error in editng/adding new 
                                   employee!!"+ex.toString());
  
          }catch (Exception ex) {
               System.out.println("Erroorr. super error!!"+ex.toString());
          } finally{
              DataDispatcher.dispatch(resultSet, pStatement, connection);
          }
      }
  </code></pre>
  
  <p>But After compiling this was my error:</p>
  
  <blockquote>
    <p>Error in editng/adding new
    employee!!com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:
    You have an error in your SQL syntax; check the manual that
    corresponds to your MySQL server version for the right syntax to use
    near '111' at line 1</p>
  </blockquote>