my table 'users' have a following schema
| id | name | class|
| 0 | John | Primary | | 1 | Mary | Primary |
I tried this query:
select * from users where id = 'a'
The mysql return all rows from table.
How can I solve this problem?
my table 'users' have a following schema
| 0 | John | Primary | | 1 | Mary | Primary |
I tried this query:
select * from users where id = 'a'
The mysql return all rows from table.
How can I solve this problem?
If id is of type Integer, you have to type it without quotation marks. For example:
select * from users where id = 0;
should return:
| 0 | John | Primary
However, the 'a' in your example is not an Integer, so I am not 100 percent sure where this comes from and if I understood you correctly.