I have one problem, when i do my query I always get same result (2), it doesn't get right ID value:

```
    $query = $this->mysqli->real_escape_string("SELECT id FROM image WHERE file_name = ?");

    $stmt = $this->mysqli->prepare($query);
    $stmt->bind_param("s", $this->name);
    $stmt->execute();
    $stmt->store_result();
    $stmt->bind_result($id);

    if($stmt->num_rows == 1)
    {
        var_dump($stmt->id);
        var_dump($id);
    }

```

Result is always:

```
$int(2)
NULL

```

And I dont even have that ID value in that table.
Notice: This query works in phpmyadmin.