...where id="100";
看看这样行不行?
你是不是用了模糊查询才会这样啊?
.... where id like "100%";?

解决方案 »

  1.   

    mysql> select * from user;
    +--------+------+
    | id     | name |
    +--------+------+
    | 100    | aaa  |
    | 1001   | bbb  |
    | 100001 | ccc  |
    +--------+------+
    3 rows in set (0.00 sec)mysql> select * from user where id='100';
    +------+------+
    | id   | name |
    +------+------+
    | 100  | aaa  |
    +------+------+
    1 row in set (0.03 sec)