title: Mysql error: Truncated incorrect DOUBLE value: 'world'
body: <p>I've tried the last 40 minutes to find out of this bug. The error <code>Truncated incorrect DOUBLE value</code> apparently means: <code>comparing a string column with an integer, because they both get converted to double for the comparison</code>.</p>
  
  <p>Here is my table:</p>
  
  <pre><code>this.sql.query("CREATE TABLE IF NOT EXISTS `back_locations` ("
                      + "`playerID` INT(11) NOT NULL, "
                      + "`world` VARCHAR(255) NOT NULL, "
                      + "`x` INT(11) DEFAULT 0, "
                      + "`y` INT(11) DEFAULT 0, "
                      + "`z` INT(11) DEFAULT 0 )");
  </code></pre>
  
  <p>And here is the method with the error (The line with the UPDATE query):</p>
  
  <pre><code>public void DB_setBackLocation( Location loc, int playerID )
  {
      try 
      {
          String world = loc.getWorld().getName();
          int x = (int)(loc.getBlockX());
          int y = (int)(loc.getBlockY());
          int z = (int)(loc.getBlockZ());
  
          ResultSet rs = sql.query( "SELECT * FROM back_locations WHERE playerID = " + playerID + "" );
  
          if( rs != null &amp;&amp; rs.next() )
          {
              //The next line is the line with an error
              sql.query( "UPDATE back_locations SET world=\"" + world + "\" AND x=" + x + " AND y=" + y + " AND z=" + z + " WHERE playerID=" + playerID + "" );
          }
          else
          {
              sql.insert("back_locations", 
                      new Object[]{ "playerID", "world", "x", "y", "z"}, 
                      new Object[]{ playerID, world, x, y, z});
          }
      } 
      catch (SQLException e) 
      {
          e.printStackTrace();
      }
  }
  </code></pre>
  
  <p>And my error:
  <img src="https://i.stack.imgur.com/0ribg.png" alt="The error"></p>
  
  <p>Thank you for answer in advance.</p>
  
  <p>Best regards Alexander</p>
  
  <p>EDIT 1:</p>
  
  <p>Here is the line printed</p>
  
  <p><img src="https://i.stack.imgur.com/ZsULh.png" alt="debug message"></p>