mysql where子句bug?

I programmed the following in php and mysql:

$id = $_GET['id'];  
if ($stmt = $db->prepare("SELECT disco, fecha, amazon from discos where id=? LIMIT 1")) {
    $stmt->bind_param("i", $id);    /* NOTE: "s" doesn't work */
    $stmt->execute();
    $stmt->bind_result($disco, $fecha, $amazon);        
    if($stmt->fetch()){
        /* Do some stuff */
    }
}

The thing is, when the value of $id is, for example: 100abcd, the query still fetches, whereas it shouldn't, as there is no id called like that, BUT it fetches the id 100.

Why is this happening? Thanks.

It's an implicit conversion from string to int -- it's the equivalent of id = CAST('100abcd' AS unsigned);

> SELECT CAST('100abcd' AS UNSIGNED);
+-----------------------------+
| CAST('100abcd' AS UNSIGNED) |
+-----------------------------+
|                         100 |
+-----------------------------+