I've tried the last 40 minutes to find out of this bug. The error `Truncated incorrect DOUBLE value` apparently means: `comparing a string column with an integer, because they both get converted to double for the comparison`.

Here is my table:

```
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 )");

```

And here is the method with the error (The line with the UPDATE query):

```
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 && 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();
    }
}

```

And my error:
![The error](https://i.stack.imgur.com/0ribg.png)

Thank you for answer in advance.

Best regards Alexander

EDIT 1:

Here is the line printed

![debug message](https://i.stack.imgur.com/ZsULh.png)