I'm getting the error "operand should be contain 1 column".
Yes, I try to compare 1 column with 3, so is what I want to achieve possible?
Clear exemple: I have a table test
id profile_id result_number
10 1232 3
10 3263 5
10 2222 4
10 2321 1
Actually, I have 3 query and I want to get all in one query. First, I get the result number of profile_id 2222 (return 4)
SELECT `result_number` FROM test WHERE id=10 AND `profile_id`=2222
Next, I get the profile_id who have result_number - 1
SELECT `profile_id` FROM test
WHERE id=10 AND `result_number` = 4 - 1
(return 3)
Finally, I get the profile_id who have result_number + 1
SELECT `profile_id` FROM test WHERE id=10 AND `result_number` = 4 + 1
(return 5)
result expected :
profile_id
3263
2222
1232
Is it possible to achieve it?