Hi,
my explanation was referred to a fictional table and I haven't tested it with the given query. Sorry this was my fault.
But I was able to reproduce it also with this table structure and a similar query.
The table structure.
Code: Select all
USE test;
CREATE TABLE test.test (
userID int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
email varchar(50) DEFAULT NULL,
password varchar(255) DEFAULT NULL,
active tinyint(4) DEFAULT NULL,
PRIMARY KEY (userID)
)
ENGINE = INNODB
AUTO_INCREMENT = 1
CHARACTER SET utf8
COLLATE utf8_unicode_ci;
The data:
Code: Select all
INSERT INTO test.test (`email`, `password`, `active`) VALUES ('[email protected]', '***', 1);
INSERT INTO test.test (`email`, `password`, `active`) VALUES ('[email protected]', '***', 1);
INSERT INTO test.test (`email`, `password`, `active`) VALUES ('[email protected]', '***', 0);
INSERT INTO test.test (`email`, `password`, `active`) VALUES ('[email protected]', '***', 1);
INSERT INTO test.test (`email`, `password`, `active`) VALUES ('[email protected]', '***', 0);
The query:
Code: Select all
SELECT
`password`,
`active`
FROM test
Steps to reproduce:
1. Create the table
2. Insert the data
3. Execute the query
4. Edit the active status for the second row to 0
5. Click the refresh button
It seems that if a unique value is available in the result, then the error doesn't occur. Then if I select additionally the email address, then the application changes only the edited field.