title: Getting "Unknown column in 'where clause'"
body: <pre><code>                    else if (str.length() &lt; 4) {
                      ResultSet myRs = myStmt.executeQuery(&quot;select * from employee where ID=&quot; + str);
                      while (myRs.next()) {
                          ans += myRs.getString(&quot;name&quot;) + &quot;, &quot; + myRs.getString(&quot;cell_num&quot;) + &quot;, &quot; + myRs.getString(&quot;commission_ytd&quot;);
                      }
                      
                      textArea.setText(ans);
                  } else {
                      ResultSet myRs = myStmt.executeQuery(&quot;select * from car where VIN=&quot; + str);
                      while (myRs.next()) {
                          ans += myRs.getString(&quot;year&quot;) + &quot;, &quot; + myRs.getString(&quot;make&quot;) + &quot;, &quot; + myRs.getString(&quot;model&quot;) + &quot;, &quot; + myRs.getString(&quot;price&quot;);
                      }
                      textArea.setText(ans);
                  }
  
                  myConn.close();
              }
              catch (Exception e1) {
                  e1.printStackTrace();
              }
          }
      });
  </code></pre>
  <p><strong>The final else block is causing the error. I am confused because it has the exact same format as the else if (str.length() &lt; 4) block (which works flawlessly). I'm sure that this is a very simple fix. I am just too inexperienced with MYSQL</strong></p>