I have a table users as,
id name status
---------------------
1 user1 1
2 user2 1
3 user3 1
When I run this query it will select the record with id 2. Why this happened? I need to select record with id 2 when only the id is 2. I did the query like,
SELECT *
FROM (
`users`
)
WHERE `id` = '2a290cf764371';
How can I fix this issue?
'2a290cf764371'is converted to2and then compared toid. To solve the problem you have to add some type checking validation on the client end.